Solved

VPS memory allocation DreamHost Wordpress

Posted on 2014-03-14
17
895 Views
Last Modified: 2014-03-17
A new client of mine in November switched to VPS. They are using DreamHost as the provider. The code is generated in Wordpress with plugins.  Since moving to VPS they have been getting memory allocation errors and the server keeps rebooting.  Before I was brought in they kept increasing the amount of memory allocated as suggested by DreamHost.  This has not resolved the issue.  

The other issue is the back-up had not worked since the VPS switch. They are using the backupbuddy plugin.  

I was going to start by checking to see if all the plugins are being used. Is there a tool that can do that? Is there a better way to got about fixing the memory issue?

Thanks.
0
Comment
Question by:kw66722
  • 5
  • 4
  • 4
  • +1
17 Comments
 
LVL 34

Assisted Solution

by:gr8gonzo
gr8gonzo earned 188 total points
ID: 39931566
If the VPS server is -rebooting- after memory allocation errors, that sounds like a more serious problem. Either you have a REALLY corrupted build of PHP or Apache or some other part of the stack, or more likely, there's some deeper problem.

Normally, if an application hits a memory limit, it'll just kill the script and tell you that it "tried to allocate ### bytes". Normally, a corrupted build will simply segfault or cause other mysterious waits/pauses and crashes. If something is causing the server to reboot, it sounds like there's a more critical component that is having a problem, like the kernel or something.

1. How did you set up the stack?
2. Did you use any package managers or did you compile from source/tarballs?
3. Did you do any updates to the kernel? (even with a package manager updater like yum update)
0
 
LVL 1

Author Comment

by:kw66722
ID: 39931589
DreamHost set up the the server and did all the compiling.  My client is using wordpress to get the static pages and plugins moved to the server.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 250 total points
ID: 39931698
It certainly sounds like Dreamhost messed up the VPS implementation but it could also be a runaway plugin or something. You can try installing the P3 plugin which will attempt to profile memory usage of your site. This may help you figure it out but my guess is that you are going to need DH's help with the server.

Something to think about is DreamPress, which is the WordPress-specific hosting offered by Dreamhost featuring varnish caching and a better-for-WordPress hosting environment.  You could move your site over to that plan via the panel.
0
 
LVL 34

Assisted Solution

by:gr8gonzo
gr8gonzo earned 188 total points
ID: 39931731
I would strongly suggest asking DreamHost to do an investigation into the server rebooting. That just shouldn't happen unless there's something -significantly- wrong, and is likely a long-term problem.

I've managed VPSes, dedicated servers, and colocated servers for many years. Unexplained rebooting is a sign of a serious problem, often hardware or low-level OS components, and DreamHost should be on the hook for fixing that if they did the setup. I'm a little surprised that they did all the compiling - usually you get a fairly clean, empty environment and it's up to you to install most of the stuff.

Re: DreamPress - The only catch with DreamPress is that it's technically moving back into shared hosting territory. That might be fine if you're not looking for admin-level rights. Normally, VPS is for people who want to test the waters of having a dedicated server without paying an arm and a leg for one (lower performance but much lower cost).
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 250 total points
ID: 39931768
Agreed but my experience with Dreamhost VPS has been...subpar.  If you don't mind the semi-shared environment, DreamPress is a bit better.  If you have to run the VPS at relatively high memory allocations, look into the DH dedicate server line as they are surprisingly affordable.
0
 
LVL 1

Author Comment

by:kw66722
ID: 39931994
My understanding is there were problems in the shared environment and they were told if the site was moved to VPS the problems would end.  Instead of that fixing the problem more became created.  

My expertise is in .net world.  So this is new to me. The person who owns the site has no experience at all.

The site has 45 plugins.  I am not sure if using so many could be an issue.  

When I run analytics the server response time is slow. I don't know if this could cause spiking.

If the site would work I have no problem advising it to be moved to an environment that is easy for a non programmer to update content.
0
 
LVL 34

Assisted Solution

by:gr8gonzo
gr8gonzo earned 188 total points
ID: 39932034
That sounds like a load of sales BS to me. Shared hosting is like being on a fast bus - it's great and reliable and can get you to your destination quickly, but you don't have much control. VPS is like renting a really old, really used, beat-up car. It's not fast or spectacular, and it costs more than taking the bus all the time, but it's your own space.

Trying to say that VPS would solve your problems is like saying that because the bus was late one day, having your own, really old car would solve all your problems. VPS is better than shared hosting in two regards:

1. Privacy (no other users on your system).
2. Flexibility (host one site or 1,000, or run your own mail server, etc - you have all the power and control)

If those weren't problems for you, then DreamHost sold you a lie.

Ultimately, the response time with analytics is probably due to the VPS environment, which is generally under-powered.

Yes, 45 plugins could likely cause performance issues or at least add to them. That's a LOT of plugins. Someone needs to stop clicking the install button! Plugins might be free to install, but they cost you in performance. Each one might not cause too much of a performance problem, but add them up and they can cause a drain. Imagine a tiny clown car that is hauling 45 children. Sure, a small car has no problem carrying several children but 45 small children weigh a lot.

I still don't think it's causing your server to reboot, but that's just my opinion.

I'd recommend Jason's advice about DreamPress if you didn't really need the advantages of VPS. I'd probably even complain to DreamHost about them trying to sell you something that you didn't need and caused more problems and threaten to leave them. Might buy you some well-deserved customer service. Maybe.
0
 
LVL 1

Author Comment

by:kw66722
ID: 39932213
I contacted DreamHost to see about DreamPress.

Here is the list of plugins.  I am slowly going through them to see if any can be removed.  This unfortunately is not my expertise.

Akismet
BackupBuddy
Bad Behavior
BuddyPress
BuddyPress Group Email Subscription
Captcha
CCGallery WP
Contact Form 7
Cron GUI
FooBox HTML & Media Lightbox
Google Analytics for WordPress
Gravity Forms
Gravity Forms Constant Contact Add-On
Gravity Forms MailChimp Add-On
Gravity Forms Quiz Add-On
Gravity Forms Survey Add-On
Insert Headers and Footers
List category posts
Maintenance
MATRIX PRO
Membership Premium
Page Links To
Platinum SEO Pack
Popover plugin
Recent Posts Slider
Recipe Card
Redirection
Regenerate Thumbnails
RSS Multi Importer
SLIDER PRO
sliderpro 3D
Special Recent Posts FREE Edition
Special Recent Posts PRO Edition
superpro RESPONSIVE SLIDER
Testimonials by Aihrus
The Events Calendar
The Events Calendar: WooCommerce Tickets
The Events Calendar PRO
U BuddyPress Forum Attachment
ULTIMATE PRO
Ultimate Video carousel
ULTIMATE VIDEO GALLERY
WooCommerce
WordPress HTTPS
WordPress Related Posts
Wordpress Video Gallery
WP Google Maps
WP Google Maps - Pro Add-on
WPP Premium Functionality
WP Simple Survey – Extended
WP Super Cache
XML Sitemap & Google News Feeds
0
Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 250 total points
ID: 39932216
There is probably some bloat present.  See below:

Akismet - Can remove if the site doesn't accept comments.
BackupBuddy - Keep
Bad Behavior - Can remove if the site doesn't accept user registrations
---------------------
BuddyPress - Assume necessary for operations
BuddyPress Group Email Subscription - Keep
---------------------
Captcha - Probably keep
CCGallery WP - Used to create image galleries, remove if not using
Contact Form 7 - Redundant if also using Gravity Forms but check to see which forms are active before removing
Cron GUI - Depends on why it was installed
FooBox HTML & Media Lightbox - Possibly redundant
Google Analytics for WordPress - Is this the Yoast one? If so, keep
---------------------
Gravity Forms - keep
Gravity Forms Constant Contact Add-On
Gravity Forms MailChimp Add-On
Gravity Forms Quiz Add-On
Gravity Forms Survey Add-On
---------------------
Insert Headers and Footers - Not sure what use this is, but check
List category posts - Sigh...it's a crutch for people who don't learn the Loop
Maintenance - Not sure what this is
MATRIX PRO - Or this.
Membership Premium - Assume this is necessary for BuddyPress
Page Links To - Not sure this is needed for anything
Platinum SEO Pack - Keep or replace with Yoast SEO
Popover plugin
Recent Posts Slider - How many sliders do we need?
Recipe Card
Redirection - This is a hugely expensive plugin.  Kill it with fire if you can
Regenerate Thumbnails - Disable until needed.
RSS Multi Importer - Another crutch for non-coders
---------------------
SLIDER PRO - Do we need this many sliders?
sliderpro 3D
---------------------
Special Recent Posts FREE Edition - Do we really need both versions?
Special Recent Posts PRO Edition
---------------------
superpro RESPONSIVE SLIDER  - Do we need this many sliders
Testimonials by Aihrus
---------------------
The Events Calendar - Assume necessary for operations
The Events Calendar: WooCommerce Tickets
The Events Calendar PRO
---------------------
U BuddyPress Forum Attachment
ULTIMATE PRO - Ultimate Pro what?
---------------------
Ultimate Video carousel - Do we need this many video/gallery plugins
ULTIMATE VIDEO GALLERY
---------------------
WooCommerce - Assume necessary for operations
---------------------
WordPress HTTPS
WordPress Related Posts - This is another hugely expensive plugin
Wordpress Video Gallery
WP Google Maps
WP Google Maps - Pro Add-on
WPP Premium Functionality
WP Simple Survey – Extended
WP Super Cache
XML Sitemap & Google News Feeds
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 62 total points
ID: 39932249
If server keeps rebooting/oom-ing  probably they (or hoster) did not configure apache (or nginx) right

BTW ask them if they can show where the plugin is used...
0
 
LVL 1

Author Comment

by:kw66722
ID: 39932584
ULTIMATE PRO says: Create easily a gallery of videos for your site with youtube and flv videos. Extremely quickly to use, add the url of your videos.

http://www.pluginswp.com/ultimate-full-video-gallery/
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 250 total points
ID: 39932666
Okay, so yet another Gallery plugin with its own CSS and JavaScript loading no doubt.

So, yeah...there is some bloat here.  You should attempt to do the following:

1) reduce the number of plugins by consolidating functions.  You don't need two form handlers, 6 sliders, and a billion galleries and light boxes.  

2) further reduce plugins by helping the site owner learn to do some basics in functions.php or in templates.  Several plugins above just provide a modified loop and may be overly expensive for the output.  Others may be glorified code snippets that could just as easily live in functions.php with a little training.

3) think about ways to reduce page loads via modification and combination of CSS and JavaScript files.  It might be time to move away from Super Cache and over to W3 Total Cache to get more control.

4) DH makes installing/enabling mod_pagespeed very simple (do it from Manage Domains) and that can help you move all JavaScript loads to the bottom of the page and get better response times
0
 
LVL 1

Author Closing Comment

by:kw66722
ID: 39933485
I thank all the contributions. I am going to speak to the client and see what can be safely removed and consider moving the website to the DreamPress environment. If I have other issues I will open a new ticket.
0
 
LVL 61

Expert Comment

by:gheist
ID: 39933573
You need to tune Apache in VPS, namely convert apache-prefork to apache-worker...
0
 
LVL 34

Expert Comment

by:gr8gonzo
ID: 39934308
@gheist - be careful about blindly making that recommendation. If he's using mod_php (many people are, especially people who are in VPS scenarios because they're likely not very experienced in admin stuff yet), prefork is a better, more reliable choice, even if it's heavier.

mod_php isn't thread-safe.
0
 
LVL 61

Expert Comment

by:gheist
ID: 39934382
Yes, it is about asking how to proceed. mod_fcgid and php-cgi comes as an answer
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The viewer will learn how to dynamically set the form action using jQuery.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now