Get your free beta license ↗
Websites · PHP

A long request reaches its execution time limit

Last updated 30 Nov 2026
Summary

A long-running page, import, or export stops with Maximum execution time of 30 seconds exceeded. The request reached max_execution_time, which you can raise in the domain's PHP settings.

Symptoms

The request returns 500 Internal Server Error after it reaches the limit. Run urbestack-domain-log --name example.com --type php to see the error in the domain's PHP log.

Output
[30-Nov-2026 08:13:12 UTC] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/USER/files/web/example.com/public_html/cpu.php on line 1

Cause

PHP stops a request that runs longer than max_execution_time. It uses the domain's value when one is set and the server's default otherwise.

PHP counts only the time the script spends doing its own work. This excludes time spent waiting on a database query or on sleep().

Resolution

  1. Check the server's PHP defaults for max_execution_time.

    urbestack-setting-get --key php.defaults
  2. Raise the domain's limit to 300 seconds.

    urbestack-domain-set --name example.com --php-setting max_execution_time=300
  3. On AlmaLinux, Apache stops waiting for PHP after 60 seconds unless you also raise Apache's Timeout. See A long request returns 504 Gateway Timeout after 60 seconds.