[wp-hackers] APC-Nginx-Apache problems / memory problems on VPS
Dion Hulse (dd32)
wordpress at dd32.id.au
Sat Aug 27 02:25:16 UTC 2011
I'm currently using Nginx reverse proxing to Apache w/ mod_php and
mod_dav_svn (This is why i'm using apache)
Due to the way Nginx caching works, You'll probably want to add a few
headers from apache to control the caching.. I'm using this WordPress
almost the same configuration file as is in it's installation page..
far i'm not having any problems with nginx.
Your problem sounds like Apache is crashing to me.. or your nginx
configuration is wrong(Nginx shouldn't drop connections, it will however
display a Gateway Timeout in the event Apache doesnt respond when it's
fetching a non-cached page). I'd want to check your Keepalive settings, and
your number of Apache workers, and see where you can go from there.
Another thought that comes to mind, is How is your Memory footprint going?
Is Apache using a lot of memory (APC is going to increase it a fair bit
IIRC) - Do you have some kind of watchdog process running which kills hungry
processes? How often are those Apache workers being recycled - Is a module
having a memory leak and therefor, the process needs to serve fewer
connections before a new one being created?
Ultimately, You're going to need to dig deep and work out where your problem
is coming from.. Enable logging for Nginx and apache, and monitor them, Are
you seeing droped connection in the nginx logs? What about in the Apache
logs? What about non-200 responses in the nginx logs? Since you're using
Cloudflare, I believe they act as yet another in-between proxy? Are the
dropped connections coming from their end rather than yours?
Finally, I'd stop using W3 cache if you're going to use Nginx proxying,
Unless you have a lot of logged in users on the site, the Object Caching
functionality of it is going to be wasted memory (IMO) and you have no need
to do static file caching in WordPress if Nginx is configured properly..
You might just have too many layers of caching, and as a result, too many
layers where problems might arrise?
On 27 August 2011 09:40, Ian Douglas <ian at powerfoundation.org> wrote:
> Thanks Daniel, and Braydon.
> I spent quite a lot of time investigating the best solution for my
> particular needs, and I'm are convinced that the Apache+Nginx combination is
> the best for these needs. I also spent some time to get everything installed
> and working. All I need at this point is a hint as to where the glitch might
> On 27 Aug 2011, at 01:25, Braydon wrote:
> > I don't understand why you need to use Nginx and Apache together unless
> you're using multiple servers and need a load balancer.....
> > On 08/26/2011 04:22 PM, Daniel Fenn wrote:
> >> Hello,
> >> I never used Apache+Nginx together, but you may want to take a look at
> >> litespeed, it faster than having apache and mod_php working.
> >> Hope this helps.
> >> Thanks
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers