PHP_FCGI_MAX_REQUESTS

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

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>

That looks OK.

When this happens, are there a lot of php or php-cgi processes running on your system?

It turns out there was a DOS attack on the website. That was the problem. All is well now.