CGI and PHP Resource Limits


Browse by products and services

  • Applies to: Grid Hosting
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Account Center Access
  • Applies to: WordPress Hosting
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Account Center Access

Overview

The following limits are in place for all PHP and CGI processes on your website(s):

  • 120 seconds of CPU time
  • 99MB of RAM usage
  • 36 processes per node

Any attempt to exceed these limits will result in a "500 Server Error."

Troubleshooting

The causes of hitting PHP and CGI resource limits are numerous, but generally depend on how code is executed and how PHP allocates memory. Although tightening up code and ensuring that processes close correctly is the most efficient means of preventing such limits from being hit, the following may help reduce or resolve ongoing errors related to these issues:

  1. You can override the default PHP configuration to ensure that your max_execution_time and memory_limit are below the default values.  This will ensure that you receive PHP error output information, rather than the very brief description of a script execution error from Apache.  For information on modifying your php.ini please consult our article How can I edit php.ini on the Grid?

  2. Toggling between FastCGI and PHP as an Apache module can sometimes help resolve such issues, depending on how your script is written. This is because of the different ways Apache and FastCGI allocate and use memory for processes. To enable or disable FastCGI on your Grid hosting service, please see our article on Enabling FastCGI.

Resources

Overview

On the WordPress Hosting service, the following limits are in place for all PHP and CGI processes on your website(s):

  • 128M of RAM usage

Any attempt to exceed these limits will result in a "500 Server Error."

If you are interested in increasing the upload_max_filesize or  post_max_size, please see this article for information on increasing these parameter limits.

Troubleshooting

The causes of hitting PHP and CGI resource limits are numerous, but generally depend on how code is executed and how PHP allocates memory. You may always set any value for max_execution_time and max_input_time to customize this, but FastCGI will trump that value if there is no output. The actual maximum for these values would ultimately be 120 seconds in cases such as this.

Resources