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

  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

  • Can anyone help please? It's really annoying and it's happening all the time... – Tobias Baumeister Aug 23 '13 at 21:29

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:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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