[wp-hackers] APC-Nginx-Apache problems / memory problems on VPS
Christopher Ross
cross at thisismyurl.com
Sat Aug 27 14:02:15 UTC 2011
Ian,
Regardless of where the theme came from, I would start there. Switch the theme to twentyeleven for an hour and measure the performance, if the problem goes away it's the theme. If not, start deactivating plugins until you find it. The WordPress core shouldn't consume that level of power, even at 4,000 hits an hour.
If that doesn't work, look at offloading your RSS feeds (http://thisismyurl.com/blog/2010/09/10/offload-or-cache-your-wordpress-feed-for-maximum-performance/) and in a worse case situation, cache the entire site without a plugin (http://thisismyurl.com/blog/2011/08/08/ultimate-wordpress-caching-method/). That last step is pretty extreme but it will allow almost unlimited traffic without server load.
Chris
On 2011-08-26, at 6:49 PM, Ian Douglas wrote:
> Hi,
>
> I'm on a Level 3 HostGator VPS: 1.13Ghz / 768MB RAM / 30GB HD / 500GB bandwidth.
>
> I have a site that usually serves 4000 pages a day.
>
> I just renewed my Wordpress site with a new theme (commerically available from a reputable company, so I'm pretty confident of the code) and some extra plugins for functionality. Before renewing, sometimes I'd get database connection errors on the shared account I was on. Eventually, I had to move to the VPS because the site was deemed to be pulling too many server resources.
>
> I was being suspended.
>
> So we did the move. Then the trouble really started.
>
> Even with 768MB RAM, I can't keep the site up. HostGator admins at first said I should disable plugins (I hate this kind of response; it is avoidance. The plugins are there for essential functionality; the question is how to get the install I want to work). In reality, there are only a few plugins that actually add to what is rendered on the main page. So far as I can see, there's nothing there that should be a massive resource hog. And there's nothing that I haven't used without problems before in a shared hosting environment.
>
> In an effort to minimise the load on the server I did the following:
>
> 1. Activated W3 Total Cache and a good number of its options
> 2. Established an account with CloudFlare and changed the DNS so I'm using their caching / CDN system
> 3. Configured APC to take the load off php
> 4. Configured Nginx to work as a reverse proxy on the server
>
> This combination, at least according to some, is about state of the art when it comes to performance Wordpress sites.
>
> But after configuring both Apache and Nginx, and getting both processes restarted, the site doesn't work. Apparently Nginx drops connections to clients.
>
> Both httpd and nginx daemons are running fine and the config check for both yields "Success" or "OK" output!.
>
> Apache's port is set to 81 and it is the stock Apache that comes with CPanel.
> Nginx is taking over port 80
>
> The site is not working even if you connect to http://mysite.com:81
>
> Using Easyapache to rebuild the httpd server did not positively affect the situation.
>
> Here are the Config Check Outputs:
>
> --------------------------------------------------------------------------------------------------------
>
> root at server [/usr/local/nginx/sbin]# apachectl configtest
> Syntax OK
>
> --------------------------------------------------------------------------------------------------------
>
> root at server [/usr/local/nginx/sbin]# /usr/local/nginx/sbin/nginx -t
> nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
> nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
>
> --------------------------------------------------------------------------------------------------------
>
> root at server [/usr/local/nginx/sbin]# ps -ef | grep -i nginx
> root 1202 1 0 15:39 ? 00:00:00 nginx: master process ./nginx
> nobody 1203 1202 0 15:39 ? 00:00:00 nginx: worker process
> root 1422 1147 0 15:46 pts/1 00:00:00 grep -i nginx
>
> --------------------------------------------------------------------------------------------------------
>
> root 1455 1147 0 15:47 pts/1 00:00:00 grep -i httpd
> root 32662 1 0 15:39 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
> nobody 32677 32662 0 15:39 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
> root 32684 32662 0 15:39 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
> nobody 32687 32662 0 15:39 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
>
>
> Does anyone have any experience of getting APC, Nginx, Apache, Cloudflare and W3 Total Cache to play together on a VPS?
>
> The site has been down now two days. I'm desperate to troubleshoot this to get it back.
>
> Would really appreciate some help.
>
> best,
> ian
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
--
Christopher Ross
christopher.ross at rodonic.com
Rodonic - http://rodonic.com
My Blog - http://thisismyurl.com
Twitter - http://twitter.com/#!/thisismyurl
Facebook - http://www.facebook.com/thisismyurlcom
(416) 900-3731
(858) 201-4912
More information about the wp-hackers
mailing list