Apache: 503 Service Unavailable

Solution 1:

You could try changing to a different MPM, which you can do in the configuration, or tweaking the parameters of your MPM. For example, if you're using the prefork or worker MPMs then you can increase the MaxClients value. In the latter case, ThreadsPerChild might also be a useful configuration value to tweak.

You can find information on the MPMs in the standard Apache documentation.

However, unless you're running a really busy website, I'm surprised you're seeing 503 errors at all - is it possible that there's some really slow server-side code that's tying up Apache requests for far too long? If so, you might get more mileage improving that than just trying to work around it in Apache.

Solution 2:

You can try setting up mod_status to get some insight into your server

Listen 127.127.127.127:10127

ExtendedStatus On

<VirtualHost 127.127.127.127:10127>
    ServerName 127.127.127.127:10127

    #
    # Allow server status reports generated by mod_status
    #
    <Location /server-status>
        SetHandler server-status
    </Location>

</VirtualHost>

The status vhost is bound to the localhost on your server. You can access it with a text mode browser like elinks, or ssh forward that port to your machine.

Solution 3:

Check your error log, which by default will be in

/var/log/httpd/error_log

If it mentions that you are our of worker processes then that could be your problem.