# A long request reaches its execution time limit

UrbeStack sysadmin note about PHP. Last updated 30 Nov 2026.

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

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

```
urbestack-setting-get --key php.defaults
```

Raise the domain's limit to 300 seconds.

```
urbestack-domain-set --name example.com --php-setting max_execution_time=300
```

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](https://urbestack.com/sysadmin-notes/apache-504-gateway-timeout-60-seconds/).

If the problem persists after you follow this note, you can [open a support ticket](https://support.urbestack.com/new?type=support). Including the output of the commands you ran helps support diagnose the problem.
