Memory spikes and left alone by support

wordpress

#1

Hi.

Once in a while, I get these e-mails …

Hey Georges,

Our monitoring systems show that one (or some) of your user accounts may be making your web hosting account operate inefficiently. We noticed you’ve frequently hit the memory limits of your shared hosting plan over the last couple weeks. When this happens, our system automatically stops web processes which could be negatively impacting your server’s performance. This means your visitors may see errors or be unable to access your website at all for brief periods of time.

These are the FTP/shell users on your account, alongside the number of times they’ve hit their memory limits:

geohei: 120

Here’s what you can do:

  1. Leave Everything As-Is
    If you’re satisfied with your current website performance, then we are too! You can leave things unchanged and our systems will continue stopping processes as your site runs into limits.

  2. Optimize Your Website
    You may be able to improve your website’s performance so that it runs more efficiently. We’ve put a lot of effort into building some really comprehensive documentation that will help walk you through the process of optimizing your site. We’ve also got some WordPress-specific optimization instructions that you may find helpful. Remember, you’re not in this alone - we’re here to help!

  3. Upgrade to VPS – THE EASIEST OPTION
    If optimization efforts don’t get the results you want – or if you just don’t have time to go through that process – consider upgrading to a fully-managed Virtual Private Server.

Move to VPS

Upgrade Today and Get One Month FREE*

VPS is just as easy to use as your current hosting, and costs only a fraction more than Shared Hosting. The difference is you’ll get instant access to more memory, guaranteed server resources, and you’ll be virtually “walled off” from the actions of other customers. You’ll even be able to continue hosting an unlimited number of websites at no extra cost!

Upgrade risk-free with just a click! If you don’t love the immediate performance improvements, we’ll happily move you back.

  • The DreamHost ‘Ever-Vigilant Website Performance Monitoring’ Robot
  1. No, I don’t want to leave it.

  2. Hardly possible because my site is really low activity! Wordpress is indeed installed, but not very often addressed. Hence this message is very misleading and DH should stop sending those e-mails unless WordPress is detected as being the memory eater, which was however not the case.

  3. No way. If my site is buring too much memory, there must either be a problem in my config or the server config.

After I say …

$ awk '{print $7}' access.log | cut -d? -f1 | sort | uniq -c | sort -nk1 | tail -n10

… I get the top hits.

So I block some IPs in .htaccess, but I keep on getting these e-mails that my memory quota is exceeded. So I ask support to help since attacking IPs keep on changing and get …

Thanks for contacting tech support and I’m sorry that our previous
suggestion did not help. Please note that identifying the exact cause of
the memory spikes for you is outside the scope of our support. Other
than, traffic, I recommend to ensure all your software on all active
sites are up to date and optimized to help reduce memory usage further.

Very helpful! :frowning:

I told them that this needs to be addressed somehow on admin level, but nada … it’s my job to take care of attacks.

error.log and access.log are checked and /robots.txt are filled up already.
.htaccess is filled with IPs as well.

How can I positively identify which processes use lots of memory (shell commands)?
What can I do more?

Thanks,


#2

This is unfortunately a topic that pops up often on the forums and there is no easy solution. On shared hosting it’s hard to see what’s exactly causing the slowdown and the best path is to optimize WordPress to the max and hope that solves the issue.

First thing to do is to run PHP7 because it makes a difference.

More suggestions are on this knowledge base article:

Hope some of these will help your site run better.


#3

Hi.

Thanks for the reply smaffulli, but also you focus on WordPress. First I would like to get the confirmation that WordPress is the generator of this performance issue. I have my doubts about this theory.

If DH support tells me to track most accessed pages, and if I assume that these are the originators, and if I block the IPs of those who access these pages, and if these accessed pages are not even WordPress URLs, and if the performance issues continue … why should PHP7 in connection with WordPress help?

Please give me a tool (= shell command) which allows me to dig through the (access|error).log in order to track the source of the performance problem.

Many thanks,


#4

What other software do you run on your account, like cron jobs or something else? Are there other users? If you only have one WordPress instance, then I don’t see what else it could be. The suggestion to look at the pages getting most traffic gives a partial view: as you noticed, those may not be served by PHP but that doesn’t mean that the low traffic pages, once hit, don’t saturate you users/group CPU+memory quota.

I wish there was such thing on shared hosting. At the moment, there isn’t a simple way for you to find out exactly what page is creating the problem. All you can do is to optimize to the max and if the issue is still there, you need to plan radical changes like moving your WordPress site to DreamPress or VPS or all the way to DreamCompute.


#5

I’ve had the same issues I’ve done diagnostics on my end my site goes offline they blame my plugins with minimal traffic and very little memory use. Worked fine on Bluehost shared hosting exactly same setup.

Feels like an upsell gimmick as I’ve had top running when these alleged memory spikes occur and there is nothing abnormal compared to other times.

They won’t even say how much memory is too much so it’s a guessing game and they aren’t any help. Mind you I use minimal plugins and have done everything in their guide and I use Cloudflare so the load from any traffic is trivially small because Cloudlfare is actually serving most of my site content not Dreamhost.


#6

Let’s assume for a moment that this is related to WP:

  • Some plugin authors simply can’t code well. So you might have one plugin that goes into an resource-consuming loop, or subscribes to hooks for intense processing with the WP loop.
  • You might have a cron job or an external web request (pings, trackbacks, WP API) that hits the server at specific times or intervals.

With WP in shared space we can only get 90-128MB of memory at any one time. Some number of plugins, maybe 12, consuming some amount of RAM each, maybe 10MB, bounces us up against that limit. Add just a little mis-behavior and the DH ProcWatch process will kick in, terminate processes, and you’ll get those emails. I’ve written a number of forum posts here over the last several months documenting a journey to identify and escape this problem.

For WP, there are a few plugins that document live hits as you move around the site, including which templates are used, RAM used, DB queries, etc. A few of these are old and not maintained but a few are more current.

We can also host many sites in a single shared account. What else do you have in your space? If you spread sites to different users within your account (/home/user…), it will help to spread the load but you’re still subject to some issues. If you do have more than one application in your shared space, try moving /home/youruser/foo_domain.tld to a new /home/newuser/.

So at the risk of asking for too much detail, but with us not being able to help without detail… what all is going on in that space?

As an aside, you can use .htaccess to manage site access but as you know that’s limited and cumbersome. Look at the IP Geo Block plugin and others like it to lock down site access against hits that aren’t relevant to your business.


#7

@smaffulli

Yes, there are cronjobs, but nothing really time consuming. I do make monthly backups of the webpage directories and databases and rsync the stuff gzipped to a private NAS for backup purpose, but this is a monthly job eating up 2 hours. That’s it. If DH complains about this, they should change their limits!

There are other users, but they are not really very active. On top, DH reported me being the one on top of the list. If it wasn’t me, the above mentioned automated message should not point me out as originator of the trouble.

If I get emails like that, I need to know what exactly causes the issues. Otherwise give me the tools to find out. Anything else is just a time consuming shot in the dark!

BTW … I changed now from PHP 5.6 to 7.0. Let’s see if this helps … If yes, the WordPress message of DH was highly misleading!

@bkerensa

upsell gimmick …

Thanks you! I was expecting the same already. No, I won’t upgrade, unless they tell me exactly what the limits (memory & CPU) are, and when they are exceeded by what! If then I can’t fix the issues, I might consider an upgrade, or possibly provider change!

@Starbuck

If it is a WP plugin, I do need to know at least the exact time that happens. Then I could check who accessed and what he did. Otherwise, I’m completely fishing in the dark!

On top, the URL hits DH support pointed out are clearly hitting an image gallery, hence not WP!

How difficult is it for DH to log ProcWatch kicks and let the user know what was kicked?

To summarize the answer … my site is really very low activity!

I didn’t get anymore DH message now since 4 weeks. As soon as they start again, I’ll post here and will dig further.


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.