Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sometimes when there's higher traffic on my website, the server randomly stops doing anything and sends 500/503 errors for a few seconds or even minutes.

The Error log shows the following message whenever someone tries to open the website and receives a 500/503-error:

mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper

mod_fcgid configurations:

<IfModule mod_fcgid.c>
 FcgidMaxRequestLen 67108864

<IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
</IfModule>

  FcgidIPCDir /var/lib/apache2/fcgid/sock
  FcgidProcessTableFile /var/lib/apache2/fcgid/shm

  FcgidIdleTimeout 40
  FcgidProcessLifeTime 30
  FcgidMaxProcesses 20
  FcgidMaxProcessesPerClass 8
  FcgidMinProcessesPerClass 0
  FcgidConnectTimeout 30
  FcgidIOTimeout 45
  FcgidInitialEnv RAILS_ENV production
  FcgidIdleScanInterval 10

</IfModule>
share|improve this question
    
Can anyone help please? It's really annoying and it's happening all the time... –  Tobias Baumeister Aug 23 '13 at 21:29

1 Answer 1

I would suggest you raise the number of available processes. You currently have it set to 20. I would raise it to at least 50 at the minimum.

You can get more information about the FcgidMaxProcesses Directive here:

http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxprocesses

share|improve this answer

Your Answer

 
discard

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.