Skip to main content

Attempting to load changes in a staging site and the bountiful error page of

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Looking through the error log, I had two messages appear 

  1. Warning 127.0.0.1
    • mod_fcgid: read data timeout in 45 seconds, referer: https://example.com or your IP address/
    • Apache error
  2. Error 127.0.0.1
    • End of script output before headers: index.php, referer: https://103.23.155.62:8443/
    • Apache error

If this is the error, then it means that code in index.php file fails to be executed in the time limit.  The time limit is set for Apache FastCGI module and/or PHP.  More likely, there is an error in the index.php, which is making it non functional. To resolve this you need increase the PHP error reporting level in Plesk > Domains > example.com > PHP Settings and review the script itself.

However, if you feel that is not the case, then another possibility is that script is meant to take a long time to execute. In this case, you may simply increase timeout via Plesk. To set 90 or 120 seconds instead of default 30, do the following:

Set max_execution_time to 120 in Plesk > Domains > example.com > PHP settings.

Click Apply and retest.

In my instance, this didn't resolve the error.  However, it progressed it.  Now showing the following messages in the error log

  1. Warning 127.0.0.1
    • (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: https://103.23.155.62:8443/
    • Apache error
  2. Error 127.0.0.1
    • End of script output before headers: index.php, referer: https://103.23.155.62:8443/
    • Apache error

This error is a quick fix... and I've written detailed notes how to do Solution: (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server.

Related articles

Andrew Fletcher18 Mar 2024
Resolving CVE-2022-48624 less issue
To resolve the CVE-2022-48624 vulnerability on Ubuntu using Nginx, it's crucial to understand that the issue lies within the "less" package, not Nginx itself. The vulnerability affects "less" before version 606, where close_altfile in filename.c in less omits shell_quote calls for LESSCLOSE,...