Re: mod_proxy maximum connections to a backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

i think it ist per process, so if you have 100 processes with max value 200 your Hard Maximum will be 20000 connections, but im not shure.

Documentation says (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass): The default for a Hard Maximum for the number of connections is the number of threads per process in the active MPM.

which makes sense, because every thread can handle one request, to handle the request a minimum of one connection to the proxyed server is needed, therefore i think it must be a per process setting. In prefork mode it is set to 1, because if you use prefork only one request can be handled per process.

regards.


George Barnett schrieb:
Hi All,

I've asked this on irc and it was suggested that I try asking the dev
because the docs aren't clear, but I'll ask here aswell.

I'm using apache httpd 2.2.3 with the event MPM to do some traffic
throttling to a backend.  What I have is this:

First, traffic hit a default vhost with lots of rewrite rules such as this:

RewriteCond %{REQUEST_URI}    ^/page.*$ [NC]
RewriteCond %{QUERY_STRING}   ^.*pattern.*$ [NC]
RewriteRule ^(.*)$ http://trafficclass.localhost/$1 [P,L]

In the hosts file, trafficclass.localhost is 127.0.0.1, so from there, the
traffic heads back into a vhost.

Then I have a vhost with the following in it:

<VirtualHost 127.0.0.1:80>
 DocumentRoot /opt/apache/htdocs
 ServerName trafficclass.localhost
 ProxyRequests off
 ProxyBadHeader Ignore

 CustomLog /var/log/apache2/gold-access.log combined
 Errorlog /var/log/apache2/gold-error.log

 <Location />
  ProxyPass http://1.2.3.4/ max=200 acquire=500
  # IIS Sucks
  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1
 </Location>
</Virtualhost>

In my setup I have 100 processes with 64 threads per process.

Last night during exceptional load, I saw over 3200 connections to the
backend.  My question - is it possible that max=200 is a per process and
not server wide limit?

If so, there's a way to set a server wide limit to the backend?

Cheers,

George



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux