Apache max AJP connections over IDP 3.4.4

Pascal Rigaux pascal.rigaux at univ-paris1.fr
Tue Nov 5 09:00:14 EST 2019

On 05/11/2019 10:11, Miguel Salinas Vivancos wrote:
> Is there any documentation about how calculate the best number of max connections in Apache? Has anyone any experience in real-world scenarios?

Complex question :)

We have apache2 (mpm worker) servers with MaxRequestWorkers > 1500.
Beware of HTTP KeepAlive (cf https://prigaux.frama.io/simulate-web-server-load/index-en.html )

I suggest:
- use apache server-status with "ExtendedStatus On".
- monitor apache, with something like:
      curl --max-time 1 -s 'http://localhost/server-status?auto' | perl -lne 'if (s/^Scoreboard: //) { $K = tr/K//; $A = tr/._K//c; $Avail = int(tr/\.//) } END { print "KeepAliveWorkers: ", 0+$K; print "RealBusyWorkers: ", $A - $K; print "AvailableWorkers: ", 0+$Avail; }'
- monitor tomcat (using tomcat "manager" for example)
- add "%D" in apache LogFormat to get requests duration
- add a valve in tomcat to get requests duration:
      <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern='%h %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %Dms' requestAttributesEnabled="true" />

Good luck!

More information about the users mailing list