问题原文
原帖链接 · Fernando · CC BY-SA 3.0
I'm running Apache 2.4.17 (prefork) on a Centos 7 server. The server specs are pretty good: 2 x Xeon E5-2697 v3 @ 2.60GHz, 512GB of RAM and 8 SSDs in RAID 10.
This Apache server is used to run a PHP software.
The normal load is between 8 and 15 but due to the server specs, it's very responsive. Also, the number of requests/sec is usually below 300.
I noticed that sometimes Apache will timeout even for local requests. This happens when the requests/sec is higher than 400 and/or the load is 20+.
If I retry the request, it works fine.
Here is the relevant configuration:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 2
<IfModule mpm_prefork_module>
ServerLimit 2000
StartServers 30
MinSpareServers 20
MaxSpareServers 80
MaxRequestWorkers 2000
MaxConnectionsPerChild 50000
</IfModule>
Some notes:
- The Apache error log doesn't show any errors at all.
- Even when this happens, the server is responsive. I can access it using SSH and other services works fine.
- I have munin installed. When the issue happens at least 50% the RAM is free, CPU usage is ~70% and the I/O usage is very low.
How can I get more information about this problem? What could cause this type of timeout?
已采纳解答
原帖链接 · Fernando · CC BY-SA 3.0
After a lot of tests, configuration changes etc. I couldn't fix this problem with Apache 2.4.
I decided to give Apache 2.2 a try using the same configuration. I only removed a few things that were Apache 2.4 specific directives.
It simply worked. Same server, configuration, application and load. With Apache 2.2 I don't get the timeouts anymore.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
