There are so many error notifications in the web technology & in the server status notification one of them is as follows:
503 Service Unavailable Error
This errors mostly comes when there is some maintenance work going on into the server & other than that mostly when the server is too busy & not able to respond to the request.
There can be so many possibilities for this but in Magento as per my observation this error comes when we are having some code issue that is when we have invoked any method which requires so much time to respond or when we have printed an object or something with very huge content of data.
To trace this you can take the following steps:
- Please check your log files.
- Please enable/allow the error message to be shown on the front-end. To do this put the below code into your
index.php file present at your root as well as present in your
Code to be placed in index.php
Note: Make sure you are in the developer mode because if you are in
production mode it is possible then also it will not show any error
message on the front-end. Please re deploy your site with the
following commands from the command prompt/terminal.
php bin/magento maintenance:enable
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento maintenance:disabled
php bin/magento cache:flush