Chapter 17 · 17.5
503 or 'Resource Limit Is Reached': what now?
You open your website and get a blank page with 503 Service Unavailable, Resource Limit Is Reached or The server is temporarily unable to service your request. Or your website has suddenly become very slow. This almost always means your package is briefly hitting one of its limits (see Resource Usage: CPU, memory and processes). It usually doesn't last long and resolves itself, but if it keeps happening, you'll want to know the cause.
Step 1: check Resource Usage
- In DirectAdmin, under Extra Features, click Resource Usage.
- Is there a message saying limits have been reached? Click DETAILS.
- Check which graph shows Faults, and at what time.
| Faults for | What happens? | What can you do? |
|---|---|---|
| Entry processes | Too many requests at once. Visitors get 503 or Resource Limit Is Reached. | Turn on page caching, block bots, make slow pages faster. |
| CPU | Too much processing. Everything slows down, and requests stay open longer, which also fills up the entry processes. | Track down heavy plugins with X-Ray, use caching, switch to a newer PHP version. |
| Physical memory | Not enough memory. Scripts get terminated. | Find the script that's requesting so much memory; don't just increase memory_limit (see PHP options: upload_max_filesize, memory_limit and max_execution_time). |
| IO or IOPS | The disk is under too much load. The site becomes slow, especially in the admin area. | Run large backups or imports outside busy hours, use lighter plugins, use caching. |
| Processes | Too many processes at once, for example due to cron jobs or apps. | Spread out cron jobs (see Cron Jobs: running tasks automatically), restart stuck apps. |
Are there no faults? Then the slowness isn't caused by your package's limits. In that case, go straight to step 3 and use X-Ray to measure where the time is going.
Step 2: check who's visiting your website
Often it's not real traffic, but a bot: a search engine reading your whole site at once, an AI crawler, or someone trying to log in thousands of times. Check the Usage log (see Site summary & logs: the error log and the access log) around the time of the faults. Do you see one IP address or one type of bot coming back very often, or lots of requests to wp-login.php or xmlrpc.php? If so, it helps to block them, for example with a security plugin or with rules in .htaccess.
Step 3: find slow pages with X-Ray
With X-Ray you can see which plugin, query or external service is taking up the most time (see X-Ray: tracking down slow pages).
Step 4: the solutions that help most
- Turn on caching. Install the LiteSpeed Cache plugin in WordPress. A page served from cache costs almost no processing power.
- Clean up your plugins. Remove what you don't use and replace heavy plugins with lighter ones.
- Update everything and use a newer PHP version (see Selecting the PHP version (Select PHP version)).
- Block bots that are flooding your site.
- Spread out your websites. All domains in a package share the same limits. Give a busy site its own package.
- Choose a bigger package. If your website has simply grown, it needs more processing power. In My WebOké, go to My Products, click Admin next to your package, and under Change hosting package choose a bigger package. The upgrade takes effect immediately after payment, and you only pay the difference for the rest of your current period.
Back online right away?
A 503 caused by limits usually resolves itself within a few minutes, once the load drops. If your website stays unreachable, also check whether your IP address has been blocked (see Solving login problems) and whether your storage is full (see Storage full: where's the space going?). If you can't work it out, open a ticket and mention the time it went wrong.
