Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

WordPress & web hosting

PHP timeout troubleshooting: PHP, PHP-FPM or the web server?

Published August 2026 · 4 min read · Updated 2026-09-07

There is no single PHP timeout setting. Start with the exact error and its timestamp: a PHP execution-limit error, PHP hard-timeout termination, a terminated PHP-FPM worker and a browser 504 can come from different limits. Raising every timeout can leave more workers tied up without fixing the slow request.

Identify which component stopped waiting

A PHP message saying Maximum execution time exceeded points to PHP's execution timer. A PHP-FPM log describing a request timeout and child termination points to the pool's termination setting. An nginx upstream timed out error can mean the web server stopped waiting for PHP; it does not by itself prove PHP reached its own execution limit.

Match web-server, PHP and application logs by timestamp and request. On shared hosting, use your control panel's logs or ask support for the relevant entry. Do not change server-wide settings that you do not administer.

PHP max_execution_time | PHP-FPM pool configuration

Check the configuration used by the failing request

This command reads the command-line PHP configuration only. It does not tell you the settings of a website running through PHP-FPM, Apache or another PHP version. A CLI value of zero can be normal and is not a reason to set the website to unlimited execution time.

Use the hosting panel or the actual web PHP configuration to inspect the website. Avoid leaving a public phpinfo page online: it can disclose server and environment details.

php --ini
php -r 'printf("SAPI: %s\nmax_execution_time: %s\n", PHP_SAPI, ini_get("max_execution_time"));'

Understand what each limit measures

PHP max_execution_time limits script execution, but the exact clock it measures depends on platform and build. PHP documents wall-clock timing on Windows; builds using Zend maximum-execution timers can also count time spent sleeping or waiting on I/O, while traditional non-Windows timing is based on execution CPU time. Check the PHP version and build you actually run instead of assuming every server measures the same 30 seconds.

PHP-FPM request_terminate_timeout can terminate a worker that takes too long to serve a request. nginx fastcgi_read_timeout measures the gap between successive reads from the FastCGI server, not a single total duration for the entire response. Your proxy, CDN or application HTTP client can have another limit.

PHP max_execution_time behaviour | nginx FastCGI read timeout

Know what PHP hard_timeout is before changing it

PHP hard_timeout is a second safety timer used after max_execution_time has already been reached while PHP is trying to tear down resources. It is not the normal time allowance for a web request. The directive is system-level configuration, so an application or shared-hosting user may not be able to change it.

A hard-timeout failure can report the normal execution limit plus the hard-timeout interval, for example as a maximum execution time of 30+2 seconds followed by “terminated”. If you see that form, investigate why cleanup became stuck as well as why the original execution limit was reached. Setting a larger hard timeout does not fix the slow request that triggered shutdown.

PHP hard_timeout directive

Find what the request is waiting for

Check slow database queries, external HTTP requests, imports, image processing, backup jobs and plugins. Compare the same action with and without the suspected bottleneck in a staging environment. Record its duration before changing a limit.

When you administer PHP-FPM, its slowlog and request_slowlog_timeout can help identify a stuck request. Enable diagnostic logging for an appropriate period, keep the logs private and account for their storage use. A host can help when those settings are not available to you.

Fix the task or change one limit at a time

Move lengthy imports and report jobs to a queue or a controlled background task when the application supports it. Give external API calls their own connection and response timeouts, and handle errors without keeping the web request open indefinitely.

If a legitimate task needs longer, adjust the setting that actually limits it, using an appropriate configuration change and rollback. Retest and watch worker occupancy, memory and response times. A hosting upgrade is useful only when resources or access are the constraint.

Troubleshoot a slow WordPress site | WordPress hosting plans and management responsibilities | Contact DotMoose support

Next step

Find which PHP timeout fired, check the right configuration, and distinguish PHP execution limits, PHP-FPM termination and nginx FastCGI read timeouts.

Compare WordPress hosting in Canada

Keep reading

Related guides.

Do I need web hosting for WordPress? What WordPress actually needs

Self-hosted WordPress needs web hosting, but it does not require a specially branded WordPress plan. Compare WordPress.com, regular shared hosting, WordPress hosting and VPS options.

Read the guide

How to move web hosting without downtime

Move a website and database with destination testing, final synchronization, controlled DNS cutover, and rollback while preserving separate mail routing.

Read the guide

Managed WordPress hosting vs shared hosting: what are you paying extra for?

Compare managed WordPress hosting with regular shared hosting by setup, updates, backups, support boundaries, WordPress tooling, migration work and operating responsibility.

Read the guide

More wordpress guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move