[wp-hackers] APC-Nginx-Apache problems / memory problems on VPS

Joe Boydston joeboydston at gmail.com
Sun Aug 28 13:13:00 UTC 2011


Ian, I've encountered similar problems with our VPS hosting. It was a long (two weeks is long when your production server is crashing daily) and painfull process. I cant provide you with a silver bullet, but the following things contributed to resolving my issues:

1.	Split your webserver and MSQL into two servers. (even if it's a temporary move) This gives you a sanity check about where the problem lies. If webserver keeps crashing and databasee server is nice an cool, you know for sure it's a code/config thing.

2.	Check database performance. One of my developers wrote a plugin to analyze slow database queries from within WP. joeboydston.com/downloads/slow-queries.zip The plugin itself adds quite a bit of load/ovehead, so use it in debug mode.

3.	Based on what you learn from steps 1 & 2, you may find like I did that some of the plugins you're using may not be scaling for you:

> google-sitemap-generator
> yet-another-related-posts-plugin

Both of these plugins caused excess load on my server and had to be dropped.




 
On Aug 28, 2011, at 5:00 AM, wp-hackers-request at lists.automattic.com wrote:

> Send wp-hackers mailing list submissions to
> 	wp-hackers at lists.automattic.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.automattic.com/mailman/listinfo/wp-hackers
> or, via email, send a message with subject or body 'help' to
> 	wp-hackers-request at lists.automattic.com
> 
> You can reach the person managing the list at
> 	wp-hackers-owner at lists.automattic.com
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of wp-hackers digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: APC-Nginx-Apache problems / memory problems on VPS
>      (Mike Schinkel)
>   2. Re: APC-Nginx-Apache problems / memory problems on VPS
>      (Ian Douglas)
>   3. Re: APC-Nginx-Apache problems / memory problems on VPS
>      (Ian Douglas)
>   4. Re: APC-Nginx-Apache problems / memory problems on VPS
>      (Ian Douglas)
>   5. Re: APC-Nginx-Apache problems / memory problems on VPS
>      (Ian Douglas)
>   6. what is this debug code? (Ian Douglas)
>   7. Re: what is this debug code? (Simon Prosser)
>   8. Re: what is this debug code? (Arthur)
>   9. Re: what is this debug code? (Dion Hulse (dd32))
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 27 Aug 2011 14:21:45 -0400
> From: Mike Schinkel <mikeschinkel at newclarity.net>
> Subject: Re: [wp-hackers] APC-Nginx-Apache problems / memory problems
> 	on VPS
> To: wp-hackers at lists.automattic.com
> Message-ID: <48EFF798-1022-4775-A9E2-5316E11C434A at newclarity.net>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi Ian,
> 
> Have you considered moving your hosting business to either ZippyKid or WPEngine.  Both are WordPress specialist hosts that focus on running high performance sites.  I believe they might be able help resolve your issues if you move your site to them and probably for no more than you are paying for VPS.  FWIW.
> 
> -Mike
> P.S. 51 plugins?  Really?
> 
> 
> On Aug 27, 2011, at 1:45 PM, Ian Douglas wrote:
> 
>> Many thanks to everyone who replied. The pointers given have been very useful.
>> 
>> At first we were getting RAM maxing out and crashing issues. Then we had difficulty getting online at all. 
>> 
>> Two things became clear:
>> 
>> 1. CloudFlare was not playing well with Nginx and we had to disable it and even reset the DNS entries. We kept getting 502 Gateway Errors. However, this may have been due to the issue we encountered today.
>> 
>> 2. Cpanel: chkservd scripts kept resetting the Apache port to 80. This basically kills Nginx, which ought to work on port 80.
>> 
>> We went to:  WHM -> Service Configuration -> Service Manager and unchecked HTTPD from the monitor column. Still it got reset.
>> We edited the  /etc/chkserv.d/chkservd.conf  and added "httpd:0"  Still it got reset.
>> 
>> We had to have HostGator admin chattr the chksrvd configuration file, forcing Apache to maintain it's port 8081 configuration.
>> 
>> Currently, we're recompiling. Next we will try to figure out what is going on that is taxing the CPU / RAM so much. 
>> 
>> I seriously don't think it's a plugin. I'm not really using anything that I haven't used on a shared environment. And although there are 51 plugins currently active, only about 8 add content to pages. A good deal of the others are benign, like Show ID for the backend or Favicon My Blog. The only plugin I imagine that may put stress on the server is Disqus. I have a couple of Twitter plugins, but would these crash a 768MB VPS? I also have three flash banners on the main page, each around 800k. Big deal, right?
>> 
>> Other stats: 9000 posts, 600 users, but only a handful active. Maybe 10 comments a day right now.
>> 
>> The base theme is WP-Prosper by Solostream. I love their themes. Very clean and precise. WP-Prosper was released 2010. It's WP3+ compatible.
>> 
>> 
>> QUESTION: 
>> 
>> I want to get the most efficient Wordpress install possible. Not just as a gimick, or to waste my own time, but for my end users, to ensure super fast access, and to get an install that allows our project serious growth in the period ahead.
>> 
>> Dion suggested that using Nginx makes W3TC redundant. Meanwhile, I read online various different views on the optimal use of applications / plugins like Nginx, APC, CloudFlare, Eaccelerator, W3TC, and Varnish.
>> 
>> Google CDN is also just around the corner.
>> 
>> What do people think is the optimal use of such applications / plugins?
>> 
>> At present I have Apache as a backend, and Nginx as a front end. I had to lose CloudFlare for now, but would like to look into Varnish, and possibly reimplementing CloudFlare (it has other features I think that are neat). Eaccelerator is also an option, via my VPS host.
>> 
>> Dion suggested that too many layers of caching could be a problem. I have not the technical knowledge of how these apps interact and differentiate to assess this.
>> 
>> What is the view of others?
>> 
>> I know some (perhaps many) will say, keep it simple, and I agree. But I'm asking about lightning fast, optimal installs. In particular with large scalability in mind, and run off a fairly modest VPS.
>> 
>> If anyone has suggestions for optimal use, please do share.
>> 
>> Thanks,
>> ian
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 27 Aug 2011 20:38:07 +0200
> From: Ian Douglas <ian at powerfoundation.org>
> Subject: Re: [wp-hackers] APC-Nginx-Apache problems / memory problems
> 	on VPS
> To: wp-hackers at lists.automattic.com
> Message-ID: <51C299AF-77E2-40A9-A2E6-77FDFF0B35EA at powerfoundation.org>
> Content-Type: text/plain; charset=us-ascii
> 
> Thanks Mike.
> 
> Actually, both of those hosting companies are significantly (almost twice) more expensive than HostGator for what they provide. I'm basically trying to reach the same functionality and scalability by customising the VPS.
> 
> I agree they'd probably have better support for memory issues than HostGator!
> 
> best,
> ian
> 
> p.s., here's a list of my plugins:
> 
> add-category-and-rss-menu
> admin-management-xtended
> adrotate
> advanced-custom-field-widget
> akismet
> backupbuddy
> breadcrumbs
> category-posts
> category-specific-rss-feed-menu
> category-write-panels
> cbnet-twitter-widget
> contact-form-7
> custom-author-byline
> custom-sidebars
> disqus-comment-system
> donations
> excerpt-editor
> extensible-widgets
> facebook-social-widgets
> favicon-my-blog
> flickr-photo-post
> get-the-image
> google-analytics-dashboard
> google-analytics-for-wordpress
> google-plus-one-google1
> google-sitemap-generator
> information-reel
> login-redirect
> logout-redirect
> multiple-category-selection-widget
> nginx-proxy-cache-integrator
> php-code-widget
> revision-control
> root-cookie
> shortcodes-ultimate
> shortlink
> showid-for-postpagecategorytagcomment
> slayers-custom-widgets
> social-connect
> social-media-mashup
> social-metrics
> top-contributors
> tweetmeme
> url-shortener
> w3-total-cache
> white-label-branding
> widgets-on-pages
> wordpress-popular-posts
> wordsocial
> wp-orphanage
> wp-pagenavi
> wp-polls
> wp-prettyphoto
> yet-another-related-posts-plugin
> 
> 
> 
> On 27 Aug 2011, at 20:21, Mike Schinkel wrote:
> 
>> Hi Ian,
>> 
>> Have you considered moving your hosting business to either ZippyKid or WPEngine.  Both are WordPress specialist hosts that focus on running high performance sites.  I believe they might be able help resolve your issues if you move your site to them and probably for no more than you are paying for VPS.  FWIW.
>> 
>> -Mike
>> P.S. 51 plugins?  Really?
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Sun, 28 Aug 2011 04:37:53 +0200
> From: Ian Douglas <ian at powerfoundation.org>
> Subject: Re: [wp-hackers] APC-Nginx-Apache problems / memory problems
> 	on VPS
> To: wp-hackers at lists.automattic.com
> Message-ID: <D75B14EE-EA0F-4F9E-91CE-E8309002E6E3 at powerfoundation.org>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> On 27 Aug 2011, at 19:45, Ian Douglas wrote:
> 
>> I also have three flash banners on the main page, each around 800k. Big deal, right?
> 
> Correction: I meant 80k
> 
> ------------------------------
> 
> Message: 4
> Date: Sun, 28 Aug 2011 04:41:43 +0200
> From: Ian Douglas <ian at powerfoundation.org>
> Subject: Re: [wp-hackers] APC-Nginx-Apache problems / memory problems
> 	on VPS
> To: wp-hackers at lists.automattic.com
> Message-ID: <6560DA91-E2C3-4935-9EF5-EC4A15B54C5A at powerfoundation.org>
> Content-Type: text/plain; charset=us-ascii
> 
> This indicates, I think, that there's a real problem somewhere. 146KB and 27 seconds?
> 
> ___________________
> 
> # Domain name	Size	       Load Time	        Average Speed per KB
> 1 mysite.com		146.25 KB	27.7 seconds	0.19 seconds
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Sun, 28 Aug 2011 08:50:19 +0200
> From: Ian Douglas <ian at powerfoundation.org>
> Subject: Re: [wp-hackers] APC-Nginx-Apache problems / memory problems
> 	on VPS
> To: wp-hackers at lists.automattic.com
> Message-ID: <C49E4BD0-D337-4534-A8D5-3B25F5F06130 at powerfoundation.org>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> On 27 Aug 2011, at 09:04, Tom Barrett wrote:
> 
>> I can recommend a VPS with 7 day money back guarantee and an active irc channel
> 
> Yes, please, Tom.
> 
> HostGator is continuing to avoid the problem completely. Today, we asked again for technical support to narrow down our issue. Their sole response to a whole page of explanation from us was that we should have upgraded not to Level 4 from Level, but to Level 6 or even Level 7 (i.e., from $50 per month to $129 or $160 per month: from 1.9GHz and 1.3GB RAM to 4.2GHz and 3GB of RAM).
> 
> ABSURD.
> 
> We need to think about alternatives for an emergency migration.
> 
> Cheers,
> ian
> 
> ------------------------------
> 
> Message: 6
> Date: Sun, 28 Aug 2011 12:37:33 +0200
> From: Ian Douglas <ian at powerfoundation.org>
> Subject: [wp-hackers] what is this debug code?
> To: wp-hackers at lists.automattic.com
> Message-ID: <A759A00E-216A-4E43-8D79-8D5F560CFBFC at powerfoundation.org>
> Content-Type: text/plain; charset=us-ascii
> 
> As some maybe see from another thread, I'm in a middle of a nightmarish situation trying to get a site to work on a VPS.
> 
> I'm checking as many things as I can understand right now.
> 
> In debug mode, I get this hundreds of times:
> 
> 
> Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /home/bikyaweb/public_html/wp-includes/functions.php on line 3382
> 
> 
> What is it, and how can I get rid of it?
> Is it important to get rid of this?
> 
> best,
> ian
> 
> ------------------------------
> 
> Message: 7
> Date: Sun, 28 Aug 2011 11:42:13 +0100
> From: Simon Prosser <pross at pross.org.uk>
> Subject: Re: [wp-hackers] what is this debug code?
> To: wp-hackers at lists.automattic.com
> Message-ID:
> 	<CAKwUDf0ojgwD8334y-jFrOaLroKXTsuw23ROeUTk5KO-HXkTfw at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Its an out of date plugin probably
> 
> On 28 August 2011 11:37, Ian Douglas <ian at powerfoundation.org> wrote:
>> As some maybe see from another thread, I'm in a middle of a nightmarish situation trying to get a site to work on a VPS.
>> 
>> I'm checking as many things as I can understand right now.
>> 
>> In debug mode, I get this hundreds of times:
>> 
>> 
>> Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /home/bikyaweb/public_html/wp-includes/functions.php on line 3382
>> 
>> 
>> What is it, and how can I get rid of it?
>> Is it important to get rid of this?
>> 
>> best,
>> ian
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> 
> 
> 
> 
> -- 
> My Blog: http://www.pross.org.uk/
> Plugins : http://www.pross.org.uk/plugins/
> Themes: http://wordpress.org/extend/themes/profile/pross
> 
> 
> ------------------------------
> 
> Message: 8
> Date: Sun, 28 Aug 2011 13:51:26 +0300
> From: Arthur <apeka1990 at gmail.com>
> Subject: Re: [wp-hackers] what is this debug code?
> To: wp-hackers at lists.automattic.com
> Message-ID: <4E5A1DAE.6070607 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> On 08/28/2011 01:37 PM, Ian Douglas wrote:
>> As some maybe see from another thread, I'm in a middle of a nightmarish situation trying to get a site to work on a VPS.
>> 
>> I'm checking as many things as I can understand right now.
>> 
>> In debug mode, I get this hundreds of times:
>> 
>> 
>> Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /home/bikyaweb/public_html/wp-includes/functions.php on line 3382
>> 
>> 
>> What is it, and how can I get rid of it?
>> Is it important to get rid of this?
>> 
>> best,
>> ian
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> Well, looks like your wp-includes/functions.php was modified in some 
> way. Or maybe, it just didn't get updated, when you updated your WP?
> 
> 
> ------------------------------
> 
> Message: 9
> Date: Sun, 28 Aug 2011 21:12:18 +1000
> From: "Dion Hulse (dd32)" <wordpress at dd32.id.au>
> Subject: Re: [wp-hackers] what is this debug code?
> To: wp-hackers at lists.automattic.com
> Message-ID:
> 	<CAL4EHfkoiNmhRE1iHyaxsFxbbGJANRLoyg1cc1R_S+W7CE5aQA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On 28 August 2011 20:51, Arthur <apeka1990 at gmail.com> wrote:
> 
>> 
>> Well, looks like your wp-includes/functions.php was modified in some way.
>> Or maybe, it just didn't get updated, when you updated your WP?
> 
> 
> *Not this at all.* The core reporting functions just show where the notice
> is thrown from, not the line of code which called it. You should really use
> a plugin such as Debug Bar and Log Deprecated Notices to know where such
> items are coming from.
> 
> Back to the original question, It's usually Themes which use get_settings()
> (I believe this is simply due to the number of theming tutorials out there
> which reference it), Plugins in general are a bit more with the times.
> 
> 
> ------------------------------
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> 
> End of wp-hackers Digest, Vol 79, Issue 37
> ******************************************



More information about the wp-hackers mailing list