2.20.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:
- Large number of heavy or damaged components CMS:
- Check all the components and plugins of your CMSby disabling them one by one, and find the most difficult or damaged ones, which slow down the loading of the site. If possible, discard such components or look for a faster analogue. Also uninstall any unnecessary components that you do not use or that you do not need to use.
- 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.