Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running an apache2 server on Debian 7

Php files are handled by fcgi. After a migration of server all is working fine. But alsmost every hour the serveur doesnt answer to http requests (http client is waiting for a response for many seconds until an error 500 happens). This last for alsmost 1 minute, then all work fine.

This happens alsmost once every hour.

Didn't find any reason, any cronjob that would match.

But in the log i have 3 related kinds of errors :

mod_fcgid: can't apply process slot for /var/www/user/wrapper
Premature end of script headers: script.php
mod_fcgid: read data timeout in 40 seconds

Also, memory usage, and cpu usage are normal during the minute the server doesnt answer and put that in the logs.

share|improve this question

It's very likely that you are simply running out of processes to deal with requests. You probably want to increase your MaxClients and/or MaxSpareServers.

You may also wish to check your PHP configuration settings (FCGI settings not php.ini)

share|improve this answer
How may i determine the correct value for that ? – user1278479 Jul 26 '13 at 22:17
Drop the timeout values by half and double the max amount of processes allowed and play with the values some :) – Tiffany Walker Jul 26 '13 at 22:20
It looks like i dont have MaxSpare or MaxClient into /etc/apache2/mos-enabled/fcgid.conf – user1278479 Jul 26 '13 at 22:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.