"508 Resource Limit Is Reached" on WordPress site

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?

Topic hosting Wordpress

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.