Knowledgebase article

PHP-FPM (70007) The timeout specified has expired: Error

This guide is for server owners (Managed or Unmanaged Servers with WHM). If you're on shared or reseller hosting and see this error, open a ticket, and Romeo will fix it on the server for you.

What it means

Your error log shows something like:

(70007)The timeout specified has expired: AH01075: Error dispatching request to : (polling)

Apache waited for PHP-FPM to answer, and PHP took longer than Apache's proxy timeout allows. It's often a slow script, a long import, or a heavy page.

How to fix it in WHM

  1. Log in to WHM.
  2. Go to Service Configuration > Apache Configuration, then click Include Editor.
  3. Under Pre Main Include, choose All Versions from the drop-down.
  4. In the text box, paste:
<IfModule proxy_fcgi_module>
    ProxyTimeout 300
</IfModule>
  1. Click Update, then restart Apache when WHM asks (or from Restart Services > HTTP Server (Apache)).

300 seconds is a comfortable value. Raise it only if you really need to.

Also check PHP's own limits

In WHM > Software > MultiPHP INI Editor, check max_execution_time for the PHP version in use. In MultiPHP Manager > PHP-FPM settings, check the Max Execution Time and pool limits.

Fix the slow part too

A longer timeout is a bandage. If one page is slow, look at what it's doing, such as a heavy plugin, a large import or a slow database query, so your visitors don't wait either.

Was this answer helpful?

Related articles

Still stuck? Romeo's got you.
Our support team replies around the clock, real humans who know your server.