Submitted by securewebs on Thu, 02/06/2014 - 14:11 Pro Licensee
We have a site that is working the server CPU a bit hard and then error out with a 500 Internal Server Error.
The logfile has this error message which I understand might relate to the number of PHP_FCGI_MAX_REQUESTS
---- can't apply process slot for /home/moura/fcgi-bin/php5.fcgi -----
I know this has been an issue for other in the past. I have not found a place to change that in the apache file. Perhaps I am looking for the wrong thing. Suggestions welcome. The site was working before but in the last few days it has stopped working and it might even be responsible for almost crippling the entire server. For sure it is spiking the Xeon CPU.
Status:
Active
Comments
Submitted by securewebs on Thu, 02/06/2014 - 14:33 Pro Licensee Comment #1
Submitted by JamieCameron on Thu, 02/06/2014 - 15:52 Comment #2
This could be because Apache's subprocess limit is too low - see http://stackoverflow.com/questions/5880045/cant-apply-process-slot
The PHP_FCGI_MAX_REQUESTS variable isn't related, as the failure is happening before PHP is even started.
Submitted by securewebs on Thu, 02/06/2014 - 16:35 Pro Licensee Comment #3
Thanks. I have been playing with the settings and really don't have a clue what I am doing. Do you think the following looks OK?
Timeout 60
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 25
<IfModule prefork.c>
StartServers 8
MinSpareServers 30
MaxSpareServers 100
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 6000
</IfModule>
<IfModule worker.c>
StartServers 4
MaxClients 500
MinSpareThreads 25
MaxSpareThreads 100
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Submitted by JamieCameron on Thu, 02/06/2014 - 21:40 Comment #4
That looks OK.
When this happens, are there a lot of php or php-cgi processes running on your system?
Submitted by securewebs on Wed, 02/12/2014 - 14:23 Pro Licensee Comment #5
It turns out there was a DOS attack on the website. That was the problem. All is well now.