Some websites cannot be loaded: 503 Service Temporarily Unavailable: can't apply process slot

Created:

2016-12-30 18:47:47 UTC

Modified:

2017-08-08 13:17:31 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Some websites cannot be loaded: 503 Service Temporarily Unavailable: can't apply process slot

Applicable to:

  • Plesk for Linux

Symptoms

  1. Some websites load continuously and eventually fail with one of the following errors:
    • 500 Internal Server
    • 503 Service Temporarily Unavailable
  2. In /var/www/vhosts/system/example.com/logs/error_log domain error log file the following messages can be found:
    [warn] [client 203.0.113.2] mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
    [error] [client 203.0.113.2] File does not exist: /var/www/vhosts/example.com/httpdocs/owncloud/favicon.ico
    [error] [client 203.0.113.2] File does not exist: /var/www/vhosts/example.com/httpdocs/owncloud/owncloud
  3. The following errors appear in /var/www/vhosts/system/example.com/logs/proxy_error_log:
    [log_config:warn] [pid 30019] (32)Broken pipe: [client 203.0.113.2:51022] AH00646: Error writing to |/opt/psa/admin/sbin/pipelog 7081, referer: http://www.example.com/

Cause

FcgidMaxProcesses limit has been reached.

Resolution

  1. Increase the FcgidMaxProcesses limit in fcgid.conf file. Location of the file is as follows:

    • For RHEL-based operating systems:
      /etc/httpd/conf.d/fcgid.conf
    • For Debian-based operating systems:
      /etc/apache2/mods-enabled/fcgid.conf
  2. Check if there are other files in the Apache configuration directory that could override parameters in fcgid.conf:

    • For RHEL-based operating systems:
      # grep -iR 'FcgidMaxProcesses' /etc/httpd/
    • For Debian-based operating systems:
      # grep -iR 'FcgidMaxProcesses' /etc/apache2/
  3. If there are any, increase the FcgidMaxProcesses limit in these files too.
  4. Restart the Apache service:

    • For RHEL-based operating systems:
      # service httpd restart
    • For Debian-based operating systems:
      # service apache2 restart
  5. If the solution above did not help, try using nginx+PHP-FPM combination. If nginx and PHP-FPM are already installed on the server, do the following:

    1. Run PHP as FPM application served by nginx at Plesk > Domains > example.com > PHP Settings
    2. Enable the options below at Plesk > Domains > example.com > Apache & nginx Settings:
      • Proxy mode
      • Smart static files processing
      • Serve static files directly by nginx
Have more questions? Submit a request
Please sign in to leave a comment.