Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I upgraded Wordpress on my huge blog (around 300 000 visitors per day) from 2.8.4 to latest 3.3.2. Everything went well but my server started returning lot of Errors 502 although it worked perfectly fine before.

It's running php-fpm & nginx with varnish caching, so this probably means problems talking to the backend, e.g. php-fpm. Did someone have similar experience and what's possible to do about it? Which settings should I adjust? I can't increase the memory limits too much coz the load is pretty high already but it was perfectly stable before the upgrade...

16 children in php-fpm config, xeon, 8gb ram, ssd, ubuntu

nginx error log is full of this:

2012/05/22 18:38:17 [error] 3643#0: *113267 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 123.45.6.7, server: site.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.site.com"

php log is ok, nothing unusual, just these exit messages caused probably by reaching max amount of requests:

May 22 18:48:47.058006 [NOTICE] [pool www] child 9509 exited with code 0 after 253.130628 seconds from start
May 22 18:48:47.058913 [NOTICE] [pool www] child 9591 started

seems there is some space for using more RAM:

free -m
             total       used       free     shared    buffers     cached
Mem:          8001       3973       4028          0         70       3271
-/+ buffers/cache:        631       7369
Swap:         2534          0       2534
share|improve this question
    
Can you post the php error logs as well as the nginx error logs? –  Kyle May 22 '12 at 16:29
    
logs added to original post –  user1394013 May 22 '12 at 16:56
    
i checked "free -m" command and it seems there is quite a few space for using more RAM, perhaps increasing childs or other settings would improve the performance? –  user1394013 May 22 '12 at 16:58
    
Have you tried restarting PHP-FPM? It looks like the issue is when nginx attempts to connect to FPM via the unix socket. –  Kyle May 22 '12 at 17:03
    
I restarted it numerous times. there was some problem with wrong permissions set on caching folder, i fixed that now too, lets see if it helps... –  user1394013 May 22 '12 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.