Magento – Magento 503 server error

magento-1.9

I'm not unfamiliar with a Magento 503 error. However, for a client I'm getting this error without any markup to the page as well and the full error reads:

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while
trying to use an ErrorDocument to handle the request.

Normally I would start looking for the "maintenance.flag" file, empty my cache, deactivate and clear compiler or see if there have been any new extensions installed. I've done all this just to be sure but especially the last sentence gives me the idea this is a problem outside of Magento. I'm also not able to access the backend as this throws the same 503 error.

What I've also done is uploading a ".html" file which is returned normally. Uploading a ".php" to the root is NOT rendered and returns the 503… What does this tell me?

What steps other that described can I take to be more sure?

Best Answer

500 errors come from one of two places.

  1. 503 is set as a maintenance server status return by Magento via the existence of maintenance.flag in the Magento root folder. This is often left behind by using Magento Connect in order to install something and the cleanup after the install didn't remove it.

  2. 503 (or other 500 status codes) is being sent out by the web server itself due to a coding error so egregious that it causes the web server to crash. This can be due to bad coding in .htaccess, php files, etc and when this happens, the cause will be written to the web server's error logs (not Magento's logs) or even throw php error log entries.

Uploading a ".php" to the root is NOT rendered and returns the 503... What does this tell me?

You will need to examine your web server error logs to see if error entries are being generated, also you need to put Magento into developer mode with full error display (if it's only the above .php script that's doing it, you will have to enable debugging in it) in order to find your coding error.

This page will give you help on the debug process: Fundamentals for debugging a Magento store