[EN] Troubleshooting a website


My website displays an Internal Server Error (HTTP Error 500) - what is wrong?

The error message is about as vague as they come by design. We don't want to display any sensitive information to random users on production websites, so the webserver is simply telling "Something went wrong and I don't know why".

To figure out what went wrong, you should look in the error log of your website. There can be many different causes to the problem, but some of the most common are the following.

  • FastCGI: comm with server "/path/to/socket" aborted: idle timeout (30 sec)
    The last piece of the log line is the interesting part, the webserver/fastcgi was waiting for a response from php-fpm but reached timeout ( 30 seconds in this case ) and gave up. So the PHP file that was requested is taking too long to execute, and you should debug to figure out why. If there is a php-slow.log in the log directory as well, look for traces in there, otherwise you can write us to get the slow log enabled.

     

  • FastCGI: incomplete headers (0 bytes) received from server "/path/to/socket"
    The webserver/fastcgi didn't receive anything at all from php-fpm ( 0 bytes ), most likely because there was a fatal error in the php code on the page requested. If there is a fatal error, php can't complete the request and nothing is returned. Have a look in the logfile php-error.log it should have a log entry of the error.

We recommend that you check the php-error.log for entries regularly. On productions websites this should always be empty. It's a sign of one or more problems requiring your attention, if entries has been logged.


How can I fix the 'handler for fastcgi-script returned invalid result code 53' that appears in my logs?

You most likely can't. If a client ( browser, bot, crawler etc. ) requests a page, the webserver receives the request and sends it to php-fpm, which will process it and send a result back. If the client gives up and closes the connection to the webserver before it receives a response, there is nowhere to send the response and handler for fastcgi-script returned invalid result code 53 is logged.

You can match the clients IP (logged with the request) with activity in the access log, and you will most likely discover that it was some odd crawler.


Where is the log files for my website?

There is various logs files to your website and the location/naming change over time as we update/modify the server, setup etc. All log files is located in either logs/ or system/logs/ and naming scheme is:

  • apache access logs: access_log, access.log or apache.X.access.log.

  • apache error logs: error_log, error.log or apache.X.error.log.

  • php error logs: On servers running mod_php, they are logged to the apache error log. Otherwise php-error.log or php.X.error.log.

  • php slow log: These are no available on all servers and not necessarily enabled pr. default. Logged to php-slow.log or php.X.slow.log.

All logs are rotated by default and is gzipped in the log directory.</p

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk