2.4.3.6 Error 503 Service Temporarily Unavailable

Each hosting account on the server is allocated a number of worker processes that process user requests. Requests are sent to the server and queued. Light requests are processed quickly, and heavy problem requests are processed slowly, slowing down the progress of the queue. When the queue length reaches a certain value, the server stops accepting new requests, returning an error "503 Service Temporarily Unavailable" (service is temporarily unavailable).

The most common causes of the problem and possible solutions:

  • A large number of heavy or damaged CMS components:
    • Check all the components and plugins of your CMS, disabling them one by one, and find the heaviest or corrupted ones, during which the site loading slows down. If possible, discard such components or look for a faster analogue. Also uninstall any unnecessary components that you don’t use or don’t need to use.
    • The best way to run the mailing list script is cron during the least load on the server, for example at night. In this case, one should take into account the restrictions established terms of Service hosting regarding the number of emails per day and the PHP script running time.
  • Lots of slow MySQL queries:
    • Install caching components into the engine that could reduce the number of SQL queries.
    • Optimize SQLqueries.
    • Index the database tables by the columns used in the selection.
    • If all else fails, it may be worth changing the engine to a more optimal one.
  • Large number of requests to the web server:
    • The loaded resource is broken / contains links to too many files (images, style sheets, JS scripts) that are loaded through separate requests. Try to combine resources into a single file where possible.
    • The site has an element that periodically sends AJAX requests to the server (for example, a chat). The number of requests depends not only on the number of visitors, but also on their habit of opening multiple tabs in the browser.
    • Indexing bots that crawl website resources (search engines, Sape and others).
    • Using resource elements or scripts on other people’s sites (links to pictures, informer scripts).

Also, the reason may be a lack of memory allocated to the site for OPcache.

Content