Whilst running a longer running script on a web server running Virtualmin, you see the following error:
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log.
In the server log file you may see the following:
[Wed Apr 10 08:01:17.339393 2019] [fcgid:warn] [pid 31481] [client xxx.61.102.164:54350] mod_fcgid: read data timeout in 40 seconds, referer: https://domain.com/admin/reports. [Wed Apr 10 08:01:17.339773 2019] [core:error] [pid 31481] [client xxx.61.102.164:54350] End of script output before headers: reports.php, referer: https://domain.com/admin/reports.
The clue is `timeout in 40 seconds` . The Virtualmin server’s default script timeout is set to 40 seconds and should be increased. See the screenshot below on where to find the setting and how to change it. It’s called “Maximum PHP script run time”.
2 thoughts on “mod_fcgid: read data timeout in 40 seconds”
Thanks! I changed the PHP config file, but didn’t know about this! Good catch!
You are super welcome. Please reach out to my mobile number or WhatsApp on +27 82 3096710 if you need further help.