How to detect the cause of the error: 'The requested URL returned error: 503'?

6

I'm working on developing a web-site where I get back the following error that I can see through Firebug :

  

The requested URL returned error: 503

Is there any way to find out the source of this problem, perhaps through logs or something like that so I can solve it?

Note:
If you wait a few seconds and update the page, I "receive" the web-site in conditions, that is, without the error.

    
asked by anonymous 31.12.2013 / 17:16

1 answer

8

HTTP error code 503 means that the requested service to the WEB server is not available, Apache usually presents such error when it can not fulfill the request in question, several reasons may be the following:

  • Excessive requests to the server, which becomes unstable.
  • Internal error generated by some erroneous configuration.
  • Lack of resources available on the server to fulfill the request.
  • Among others.

To find such errors, apache provides two places to look for errors, ErrorLog and AccessLog , in a default apache configuration, these logs can be found in

  • /var/log/apache2/error.log
  • /var/log/apache2/access.log

respectively.

If you are working with more than one virtual host in your installation, they may or may not be being written to different locations.

To write the site.com virtual host logs for example, add the following lines to the corresponding <VirtualHost>...</VirtualHost> session:

CustomLog /meu/caminho/onde/quero/salvar/os/logs/site.com.log combined
ErrorLog /meu/caminho/onde/quero/salvar/os/logs/site.com.error.log

and then the files site.com.log and site.com.error.log will contain the access and error logs respectively.

    
02.01.2014 / 04:46