cancel
Showing results for 
Search instead for 
Did you mean: 
Go to solution
Paradoxer
Experienced

Memory Usage and I/O Usage frequently maxed.

Memory Usage and I/O Usage for my Wordpress based website is constantly being maxed. Memory Usage will typically spike when I publish a new post, or edit a newly published post, and this causes the website to crash and return a 503 error.

 

This only started happening when my website was moved from Web Economy (Linux) hosting to cPanel Deluxe (Linux) 2 weeks ago, which I had paid GoDaddy to perform themselves. Ever since, crashing has been a constant issue.

 

I was told by WP Premium Support that this could be caused by high traffic to the website, which is apparently mostly spam? When I go to cPanel > Bandwidth, it says the HTTP usage is currently at 74.46 GB for January 2018. I was also told that part of this could be a high amount of views on the website's forums (again, spam?). The website and the forums are on separate databases.

 

I was also told that the WP-Smush plugin, which I thought was an effective plugin to optimize images, was problematic because it creates several images of different sizes per image, maxing the website's resources?

 

I have tried everything. Contacting GoDaddy web hosting support. Upgrading my cPanel Deluxe account to cPanel Deluxe 2. Paying for Wordpress Premium Support. Looking at similar problems people have reported in the past. Disabling all plugins and trying to identify a culprit. None of this has worked, and I don't know what else to do.

19 REPLIES 19
Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

Did WPPS install a caching plugin? Their optimization service should do that, I'd request it if they haven't.

Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

Oh, this is persona central, I know we set that up Smiley Wink Hey again. Honestly on your first post, I was impressed that your site was running alright on shared cPanel. This is common for high traffic sites. Does it get bad enough that it affects how your sites run for visitors, or are the graphs just high?

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

I am currently using W3 Total Cache + CloudFlare. What WPPS installed are:

1. ManageWP - Worker

2. UpdraftPlus - Backup/Restore

 

When a backup of the site was attempted with, I believe, UpdraftPlus, it would just crash the site by maximizing its memory usage and I believe it was never completed, but I hadn't heard back concerning that.

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

Hello again, and thank you for the help last time. Unfortunately, it seemed that the issues didn't end there.

 

The issues get very bad. It's gotten to the point that sometimes the Memory Usage and I/O Usage will peak by themselves for a small period of time, and each time it happens, the whole site goes down. When I publish a post and it goes into the red, that doesn't have any visible effect, but it gets scary because the Memory Usage might get maximized right there depending on the post, or if any updates are made to it, and if it does, the website will go down for a very long time. I'm often required to go into phpMyAdmin, disable all plugins, and then the Memory Usage is restored after a varying amount of time.

 

Is the traffic my website is getting really that massive that my hosting account wouldn't be able to handle it? It's not that big of a website, and I upgraded from Deluxe to Deluxe 2 simply to prevent this from happening. There was the explanation before, but it still confounds me that Web Economy, which I had just a month ago, didn't present these issues as badly as now with an apparently superior hosting service.

Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

I'd rely on the cPanel automatic site backups option, php backup scripts can be resource hogs.

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

For backup, I don't personally need it because of that and I use FileZilla to transfer files locally, but the Wordpress Premium Support individual told me that he would need to use it before he could modify aspects of my website. The backup wasn't successful, I believe, and support fell through at that point. Which is why I'm now posting here, since I'm out of options, and there has to be some kind of issue causing this.

 

An example: after I paid for GoDaddy to handle the migration from Web Economy to cPanel Deluxe, I realized that the File Usage was red-lining. I didn't understand why, and I contacted GoDaddy hosting support for help. They told me that this was because of too many plugins on my website, or because there was a backup plugin in effect. When I looked into it myself, I found that it was neither, and that there was a duplicate of the entire website in my website's files that GoDaddy had made in some "Cloud" folder, but that they had not told me about, during the transfer process. When I deleted it, File Usage went back to normal levels.

 

I'm thinking there's a similar omission, or some other kind of problem, here.

Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

I've posted this twice, it keeps not showing up. You should look into turning on memcached for the xenforo section of your site.

 

Also, the php processes section of cPanel has a kill processes option, it might be a better way to get your site back up when this happens.

Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

I hope someone else from the community can chime in, because in cases like this finding the exact cause can be tough. Between cloudflare and the caching you've done the right things to try and mitigate. 

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

I'm trying to write something, but it keeps getting removed:

 

In cPanel, the memcached PHP extension has been enabled (for a little while now), and I've now followed this instruction to enable memcached through XenForo based forums by adding it to the library/config.php file on my forums. I can't tell if this changed anything, but I sure hope it has.

 

And thanks for the tip on killing the processes. The next time the website crashes, I'll make sure to try that instead of disabling all of the plugins in order to restore it.

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

A follow-up: so the problem still persists after I established XenForo on memcached, unfortunately. I also deleted a backup .zip file of my website in its files, hoping that reducing the file usage could help, but it did not.

 

My website was recently brought down simply by publishing a single post with a few image galleries and Twitter embeds. Killing all the processes would not work; each time I would do so, I'd then return to the page and a bunch of processes would return. They all have the label "/usr/bin/php". 

Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

And I'm assuming you have the posts automatically go to your social media when you put them up. It sounds to me like it's the initial surge of traffic doing it, especially if the processes come back after killing them.

 

W3 total cache set to Disk Enhanced for page caching is supposed to prevent your site from needing to open a php process every time someone visits your site, it sounds like it's not doing its job. Maybe the other big caching solution will work better for your site. Try completely uninstalling W3 total cache, and use WP Super Cache. With that one it's important to go to the advanced tab and use expert mode. The default mode still needs php to load pages for visitors.

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

That's correct, when a post goes up, it's automatically sent to different social media accounts. However, the website usually crashes immediately once a post is made, within seconds of the publish. The Memory Usage will also spike when a draft is saved for a post that contains multiple images/galleries/embeds.

 

There was this line added to wp-config.php a long time ago when I had dabbled with WP Super Cache, where it added:

 //Added by WP-Cache Manager
define('DB_NAME', 'XXX');

When this is removed, the site will crash, and only be restored once I put it back; it has been there ever since I uninstalled WP Super Cache years ago.

 

Anyways, that's more of an aside. This has become such a complicated process. Thanks for the help; I'll keep at it and try to find a solution.

Re: Memory Usage and I/O Usage frequently maxed.

The exact same thing has been happening to my site - which every time I publish a post, the PHP  processes go through the roof, and I need to kill them all for all the sites on my hosting account to come back.  Sometimes I need to hit the kill button a few times. The same thing happens when I post to social medial using the SNAP plugin. I have disabled the snap plugin, and everything runs smoothly, but as soon as I save a post, BOOM, all processes go high again, eventually giving 503 errors on all sites on the server.

 

I too have cloudflare, and have played with the cache plugins too - still same issue happens.

 

Like you, this all started when I migrated my site from Managed wordpress - which was on PHP 5.4 to Hosting which is on Php 7.1 - I figured the managed WP was on an inferior server resources and things would improve migrated to Premium business hosting plan.

 

One thought I had was it could be a PHP 7.1 issue. I did speak to someone in a wordpress group who said they had similar issues, and upgraded to PHP 7.2 and everything is running smooth. 

 

Unfortunately php 7.2 is not yet available  to switch to under the select php version. I spoke to support and they said there is no timeframe when that version will be released on our account, so unfortunately we have no way to test if that is the culprit.

Paradoxer
Experienced

Re: Memory Usage and I/O Usage frequently maxed.

My website now runs smoothly again after dealing with trying to fix the problem for about 1.5 months. It was basically a variety of things that I needed to address before it got to that point.

 

The PHP version was not one of the issues. Throughout troubleshooting, tests were made to see if going to an older version would alleviate the issues, but it turned out to be better to leave things at 7.1 (granted, all elements of my website are compatible with that version).

 

Clearing out unnecessary or suspicious directories from the File Manager, related to the host migration.

 

Blocking some problematic crawler IP ranges.

 

I use Cloudflare SSL, however I hadn't created an Origin Certificate for my website after it was purchased, so I did so. I also created a page rule in Cloudflare of "website/wp-content/uploads*" to decrease bandwidth usage for images, following the instructions on this page.

 

Deleted some resource heavy plugins such as Jetpack.

 

Those are the main methods I used to rectify the resource issues I was having.

Re: Memory Usage and I/O Usage frequently maxed.

Thanks for the details - I have been experimenting with deleting some more intensive plugins like woo commerce which I was on the fence about anyway and its PHP processes are not causing server crashes any more. 

 

What is extremely strange is that I had this running identcle on the Ultimate Managed Wordpress (UMW) plan before migrating this over to Business Hosting.  

 

Therefore if not the php version issue, I wonder if this is more of a server specs issue? 

Does anyone have an idea of  what the server specs are for the UMW plan is ? I do know my business premium hosting is 2 CPU, 2MB Ram and 120 Storage. 


Perhaps the UMW plan had more available ram allocated  to better manage all the PHP processes that I have? That is the only variable between the 2 plans.

Re: Memory Usage and I/O Usage frequently maxed.

Ben - can you please look at what I wrote in this thread about server specs comparison - thanks

Employee
Employee

Re: Memory Usage and I/O Usage frequently maxed.

You can't compare the two plans like that. And you'll see why I immediately talk about caching plugins with cPanel, and never mention it with Managed WordPress.

 

cPanel hosting puts each customer's site in a container, either through cloudlinux and cagefs on shared or openstack containers on business hosting. Since it's all on one machine the specs actually mean something, particularly with business hosting because you are guaranteed the resources of the container. You basically get a slice of a server for your website. Also protip we recently refreshed our business hosting lineup, you can probably get more ram for the same price now if you click options on the plan and upgrade to a current offering.

 

A simplified description of managed wordpress: you have some caching proxy servers running varnish, connecting to some web servers running apache, that each connect to a network storage server with your files, a MySQL database server, and a Redis server for PHP object caching. All of those things are big servers shared with a bunch of other customers with different ways of load balancing and trying to keep one customer from hogging everything. You can't exactly talk about cpu cores or ram for one customer with that kind of setup.

 

Re: Memory Usage and I/O Usage frequently maxed.

Thanks for explaining - So then , if not CPU or RAM, then what specifically would cause  a lot of php processes running at once NOT cause freeze up issues on managed WP, but the identical site on my Business cpanel the processes build up so much that all the websites on the hosting plan get 503 errors?

 

If I know what is used on your managed WP, then I could duplicate that on Business hosting perhaps.

Employee
Employee
Solution

Re: Memory Usage and I/O Usage frequently maxed.


@uniquehunterswrote:

Thanks for explaining - So then , if not CPU or RAM, then what specifically would cause  a lot of php processes running at once NOT cause freeze up issues on managed WP, but the identical site on my Business cpanel the processes build up so much that all the websites on the hosting plan get 503 errors?

 

If I know what is used on your managed WP, then I could duplicate that on Business hosting perhaps.


Hi there,
When you talk about Business hosting vs Managed WordPress, you are realistically talking about different engines and different ways the environment is handled. Managed WordPress PHP process memory is held separately from the database memory vs Business Hosting where you have your exact limit and your database processes and PHP processes that run from the same pool.

 

If one drags it down or uses all the resources, it would give you the 503 errors due to the server not having enough resources to run the extra needed processes.

 

From the Managed WordPress environment, resources are allocated to the customer that needs them.
This works better for customers that might need that extra bump in resources but don't specifically know what amount of resources they need to run the site.

 

On Business Hosting, all you get is what you pay for and not anything more. So it comes down to identifying what is using all the resources specifically.

I hope this helps for a more pointed solution.

 

On servers you would have to look at active running processes to see the highest level commands for a more in depth diagnostic.

 

You might be able to connect using SSH using the command ( top -ca ) to view highest level processes. 
I believe this would only work for the Business Hosting plan and as such, it will help you identify the culprit of potentially some PHP processes that don't close or finish with the amount of resources that you have, might cause hanging that you mentioned.

 

Best regards,

Michael A. - GoDaddy | Employee
24/7 support available at x.co/247support