How to Fix the HTTP 508 Error Codes on your WordPress Website

Posted on July 6, 2020 by in WordPress | 0 comments

How to Fix the HTTP 508 Error Codes on your WordPress Website

No one likes seeing error codes pop up on their WordPress website. And if you see an HTTP Error 508, it might be a little harder to diagnose than some others. Not because the error itself is extra troublesome, but because there are two 508 errors loop detected and resource limit reached. there are two 508 errors loop detected and resource limit reached. One being the HTTP error where a loop has been detected in either a resource or URL request and the other being when the server is overtaxed can’t perform the actions. Either way, we’re going to walk you through these error codes so that your site is back up and running as quickly as possible.

Subscribe To Our Youtube Channel

What is the HTTP Error 508: Loop Detected?

Somewhere on the page, a link or resource is being called, and then that resource calls something else that then calls the original resource. The server doesn’t ever get to actually fulfill the request because the logic is recursive and looping in on itself.

The HTTP error 508 itself is actually pretty rare. In terms of loop errors, you are more likely to run into a “too many redirects” where someone has mishandled 301 and 302 redirects to where either they’re looping in on themselves or simply have too many redirects in a chain that prevents the requested resource or URL from actually rendering.

How to Fix a 508 Error

In general, it’s a pretty easy fix. As always, if you’re a user who gets this error, we highly suggest reloading the page with CTRL/CMD – Shift – R to bypass the cache and then empty your own browser cache to make sure things aren’t hanging up on your end.

If you’re a server admin, you’ve got a couple of solutions that you can work through. The first is pretty simple if you’re running any kind of CDN or caching plugin on WordPress.

If you use a plugin like WP Rocket, just go into the settings and find the buttons that let you clear the cache, delete files, and/or regenerate CSS.

wp rocket settings

And if you have a Cloudflare or other CDN account, you will be able to go into the settings and find the Cache Purge option.

cloudflare cdn

If neither of those solves the redirect issue and your resources are still looping recursively, then you need to check your .htaccess file. This is where URL redirects go (unless you use a 301 Redirect plugin). You will need an FTP client and a code editor. Or access to your site’s web-based file manager.

redirect htaccess

Go through each link that you have here, especially if you’re using relative links. Make sure that none of them are recursive. It’s actually pretty easy to do, especially if you’re working with a large number of redirects. The same goes for your plugin, too. Make sure that you go into the plugin settings and check that all the URLs the same way.

301 checking

If none of that helps, and the resources are still looping, it’s time to contact your host. They should be able to help sort out the loop from their end.

What is the Error 508: Resource Limit Reached?

The other 508 error that users and admins have to deal with (and probably the more common one) is the resource limit reached message. And this one is pretty self-explanatory. Your website has reached the top of its allotted resources on the server. There are a number of reasons that this can happen, but the first place you should check is your cPanel (if you have one) or your dashboard otherwise.

cpanel stats

Somewhere in your page will be a full list of stats regarding your server. You will see the databases, the number of executions on the server, inodes, etc. The detailed stats will give you the specific scripts and processes that were executed over various timeframes.

If you see something spike in these, or your inodes or space is filling up, that’s a good indication as to what’s up. You just might need to thin things out a bit.

Otherwise, it would be a few things.

You’re Being DDoS Attacked

Your server can absolutely run out of resources and return a 508 if you are under a DDoS attack. A DDoS is a distributed denial of service attack, where someone floods your website with so much traffic that it literally can’t keep up. Usually, this is done via botnet, a large collection of linked computers acting under the command of an individual or group of individuals.

If you get DDoSed and your server crashes, there’s very little you can do immediately. You might not even know you’ve been hit by a DDoS. You just know your server is down. Contact your host and see if there have been surges in traffic that spike particularly high.

If so, you can block the IP ranges that come in from the attack, and your server should recover shortly.

You Legitimately Get a Ton of Traffic

You can also return a 508 if your server gets overwhelmed, and it can’t handle genuine traffic. Maybe you got a lot of traffic from Reddit or an exceptionally well-written Tweet. If your server is down for this and giving a 508, then contact your host and upgrade your plan. That’s about it. Because you want your servers up and running as quickly as possible.

Malware

Remember those botnets we mentioned above? Well, your server might be a part of one, and you don’t know it. If there is malware on your server that you aren’t aware of, it can be sapping resources that should be going to your website into something else. So run a malware scan, adopt a solid WAF and security plugin (Sucuri, WordFence), and make sure that your server is being used for what it’s meant to be: helping your website succeed. Not crashing other people’s.

Additionally, if your site is running more slowly than usual and nothing has changed, consider checking for malware, too. That’s generally a precursor to it running out of resources.

Unknown Scripts, CRON Jobs, and Unused or Outdated Plugins

You should also be well aware of how your website is performing in general. Make sure that you run site checks periodically and that you make use of various debug and error logs that you have available, either through your web host or your site itself. These will show you any CRON jobs that you have running, and any scripts that might be running in the background at different times. In many cases, all of them aren’t necessary.

Plus, you can do a full sweep of your plugins and themes if you’re a WordPress user. These eat up resources over time, and while the amounts are negligible for the most part, all it takes is one security flaw or rogue script to cause a world of problems. Or a 508 error. So make sure that all plugins you’re actively using are up to date, and that all the plugins and themes you’re no longer using are gone. This clears up storage space, memory, and inode usage.

Wrapping Up

In the end, many people will never see an HTTP Error 508. Using redirects effectively and preventing recursive loops in your request and back-end logic is the primary way to keep from seeing it. And if your resources are being overused, your CPU being taxed, and your site going down, there are some easy checks you can run to figure out the culprit and take decisive action.

What have your experiences been with HTTP Error 508?

Article featured image by Pro Symbols / shutterstock.com

Premade Layouts

Check Out These Related Posts

How to Fix HTTP Error Code 410

How to Fix HTTP Error Code 410

Posted on August 12, 2020 by in WordPress

As is often the case, typing the wrong URL will find you confronted with an error that says the page you’re looking for isn’t there – a classic 404 error. Trying again later may see you finally get to the page you were originally after. However, if the page has been permanently...

View Full Post
The History Behind “Hello World”

The History Behind “Hello World”

Posted on August 11, 2020 by in WordPress

Hello World. The two most famous words in all of programming. Two words that every WordPress user has seen numerous times. Every coder and programmer has typed them countless times. But why is hello world even a thing? Why are they the two most ubiquitous words on the internet? Let’s take a...

View Full Post

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Join To Download Today

Pin It on Pinterest