PHP script timeouts after Postfix reconfiguration / failure on a Virtualmin host

Your server suddenly times out after Postfix re-install / failure. Virtualmin offers three server execution modes viewable under Server Configuration / Website Options. The three options are:

* CGI wrapper

No matter how long you set the timeout, PHP still times out, but only times out when email is sent. For example on FCGId you get:

[Thu Jan 24 09:37:56.167498 2019] [fcgid:warn] [pid 8618] [client y.y.y.y:57813] mod_fcgid: read data timeout in 121 seconds, referer:
[Thu Jan 24 09:37:56.167545 2019] [core:error] [pid 8618] [client y.y.y.y:57813] End of script output before headers: invoices.php, referer:

On CGI wrapper you get:

[Thu Jan 24 09:57:34.279484 2019] [cgi:warn] [pid 11564] [client x.x.x.x:50858] AH01220: Timeout waiting for output from CGI script /home/vander/cgi-bin/php7.2.cgi, referer:
[Thu Jan 24 09:57:34.279560 2019] [cgi:error] [pid 11564] [client x.x.x.x:50858] Script timed out before returning headers: php7.2.cgi, referer:

And on FPM you get:

[Thu Jan 24 09:59:52.462808 2019] [proxy_fcgi:error] [pid 12055] (70007)The timeout specified has expired: [client x.x.x.x:50914] AH01075: Error dispatching request to :, referer:

The solution was as root, do this:

alternatives –config mta


Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top