2.8.8. max_execution_time

Parameter max_execution_time sets the maximum time in seconds during which the script must fully load. If it doesn't, the parser exits the script. This mechanism helps prevent server hangs due to poorly written scripts.

Parameter value:

  • In all regular hosting tariffs it is equal to 30 seconds with the possibility of increasing up to 60 seconds.
  • In tariffs businesshosting can be increased up to 3600 seconds.
Zero parameter value in PHP settings means "use the limit of the current tariff plan".

If there is a need to regularly perform operations that require an increased execution time value, you can:

  • Consider running the required script on a schedule using the task scheduler cronfor which the execution time limit is higher.
  • If you are using a regular hosting plan, consider shifts the current tariff for one of the business hosting tariffs where the execution time limits are higher.
  • Consider the option of placing a site on VPS or a dedicated server without our administration, where the limit can be configured independently, up to its complete disabling.

How is the execution time calculated?

Parameter max_execution_time takesintoaccount only the useful time of the script. Any waiting in the process of execution is not taken into account, so in reality, scripts can run longer than the set limit. Most often, the duration of the script increases due to the presence in the script of calls to various resources and waiting for a response from them (for example, a database or another server from which data is requested). When running for a long time, the script will be forcefully terminated due to the process execution time limit (it differs in different fare types).