I have a WordPress site that's been running perfectly since 2016, and then suddenly started having "508 Resource Limit Is Reached" problems in mid-2019. According to Awstats on my hosting cPanel, all the hits were coming from a singe IP address and the page it has been asking for is /wp-admin/admin-ajax.php

It's not a website that I would expect to suddenly have a huge increase in legitimate visits that would max out the resources, so I'm assuming it's a Spambot creating a DDOS attack.

I disallowed the IP address via .htaccess, which solved the issue for about a month, then the same issue recurred with a different IP address.

I've now blocked 4 IP addresses ... but I need a more longterm solution. I've had no luck with Googling for a solution, so I'm not sure where to even identify the problem.

Any ideas?

e.g. Would renaming /wp-admin/admin-ajax.php help?

  • Note that I've already checked for and discounted resource-consuming plugins or operations as being the cause.
    – cobberas63
    Jan 30 '20 at 4:28
  • Renaming /wp-admin/admin-ajax.php would break your site. Don't do that. Jan 30 '20 at 4:32
  • @JacobPeattie I'd have to rename all the reference to that file too ... but I really don't want to implement this option!
    – cobberas63
    Jan 30 '20 at 4:44
  • I could also try blocking all IP addresses except mine (as per solution on stackoverflow.com/questions/20040307/…) but this is also not ideal - if anyone ever takes over the administration of the site, this could cause many annoying headaches!
    – cobberas63
    Jan 30 '20 at 4:47
  • 1
    @CaptainPhoenix I ended up blocking all IP addresses except mine (as per solution on stackoverflow.com/questions/20040307/…) as it was the only remedy that worked long-term and I needed to move on to other work. I haven't had the issue since.
    – cobberas63
    Jun 6 '21 at 7:07

You could try this solution

The parameter EP (Entry Process) controls this fact or cloud linux. If the limit is reached, the Apache module “mod_hostinglimits” won’t be able to place the Apache process into that particular LVE. The server will return 508 error (Resource Limit Reached), without affecting other users on that server.

How to fix this?

  1. Please check your Resource using from cPanel.

    cPanel >> Logs >> Resource Usage.

  2. In the WordPress sites, this problem is common due to Wp-login.php attack. You can protect the site against this.

Please see the hardening steps for a WordPress site :>>

a. Don’t use the ‘admin’ username and You can also use the plugin Change Username to change your username. b. Use a strong and complex password. You can use the Force Strong Password plugin.

c. Insert this code in the .htaccess file to lockdown error pages.

ErrorDocument 401 default
  1. Now please check your website situation, If any of the above steps didn’t work, you may need to upgrade the EP value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.