Hello, whenever I start getting higher traffic (at around 200 users online), website becomes unavailable.
I don’t get any alerts regarding CPU, Memory, Disk or Bandwidth related.
On the site I use WP Super Cache plugin + premium wordpress themes (including AMP).
Please assist to find the reason off website getting not available during these times.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi,
Wordpress depending on the plugins that you are running can require quite a lot of resources and the problems will start when concurrent connections increase. There is usually a resource that becomes pegged at that point, which is most likely CPU, and potentially RAM.
Based on your traffic graph that you provided it looks like 95% of the time the traffic is very low and then suddenly you get a large spike.
What you can do is use a load test to simulate the number of active concurrent connections and then see how your resource usage changes as those connections are processed.
So if you are normally receiving 1-10 connections per second look at your load. Then increase it to 10-25 and look at how load across CPU and RAM changes, then increase it to 25-50, 50-100, 100-200, etc.
That will show you the corresponding load on the system and eventually you will get to a point where the system is overloaded and the website stops loading, which will indicate, ok, this is the breaking point.
But now you will have an idea that a Droplet the size of X, runs out of CPU/RAM at Y load, so you can either increase it if you anticipate a future spike, or work in some more basic caching. Supercache is good, but it’s still a wordpress plugin, which means that it will still take up a lot of resources.
What we’ve done in the past is actually setup two separate web servers on the same system. One that is actually processing wordpress requests and a separate lightweight nginx server in front of it, that is reading off of a very basic static cache which is regenerated every 5-10 minutes. Usually the system is overloaded with requests to your index, or to a particular blog post, so this simple static cache handles those requests at 99% less load because it isn’t doing anything dynamic. It’s not an ideal solution, but it gives you some breathing room to figure out something more long term.
Heya,
There are two things I will generally check if there is no sign of resource exhaustion.
Check your web server’s configuration (Nginx, Apache) for limits on simultaneous connections. For Apache, look at MaxRequestWorkers or ServerLimit. For Nginx, check worker_connections and worker_processes.
MySQL has a max_connections setting that could be limiting concurrent connections. If the limit is hit, new users will receive errors.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.