Server Fault Asked by develth on November 10, 2021
Since a few days i recognize that my apache2 is going very slow if it has around 90 current request.
If i do a loader.io test it timeouts for example after 13 successfull requests:
loader.io results http://d.pr/i/S6D1+
What i really wonder about, is that my CPU usage is normal (screenshot while loader test):
htop display http://d.pr/i/kNZ4+
Also my Memory has enough free space.
free -m outputs:
total used free shared buffers cached
Mem: 24158 6494 17663 0 259 2492
-/+ buffers/cache: 3742 20416
Swap: 24574 0 24574
My current apache2 settings:
Timeout 20
KeepAlive On
MaxKeepAliveRequests 75
KeepAliveTimeout 2
<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 10
MaxSpareServers 30
ServerLimit 200
MaxClients 200
MaxRequestsPerChild 4000
</IfModule>
EDIT:
More Specs as requested:
OS: Debian 6.0.7 (2.6.32-5-amd64)
mySQL-Server: 5.5.30-1~dotdeb.0-log (Debian)
PHP: 5.3.22-1~dotdeb.0 with Suhosin-Patch (cli)
APC Settings:
; configuration for php apc module
extension=apc.so
apc.enabled=1
apc.shm_size=512M
mySQL Tuning Primer sais also, that everything is ok.
The Site i was testing was a TYPO3 Site with some AJAX on the Startpage.
Just tested the Site on a simple WordPress on the same Server ( no problems at all )
Success responses: 3097
Avg response time: 1503
Sent from app: 20.86 MB
Rcvd from loader: 369.10 KB
Testing on this TYPO3 fails early
Any idea why this happens?
Even apache2ctl status gets very slow!
But the other things on the system acting normal.
Don´t know why this happens after this time.
If CPU and memory are ok, you can try changing the value of ServerLimit and MaxClients to a high number, and do the test again . In the htop capture I can see "446 tasks" so it seems that the number of httpd processes are reaching these limits.
But this is just a workaround, the timeouts will appear again after more requests in the test. What do you need to looking for is why the httpd request is taking around 6 seconds, maybe something in the code that is not working fine.
As you say with a simple wordpress site, the tests run fine, so you need to check the application (¿php? , ¿python?) you are testing. In the database, check if there are slow queries (mytop or mtop are good tools) when doing the tests.
Answered by hdanniel on November 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP