Portal Home > Knowledgebase > Articles Database > Nginx + php5 fpm is slower than apache + php5


Nginx + php5 fpm is slower than apache + php5




Posted by bonjurkes, 06-29-2011, 04:05 PM
On a wordpress site. edit : I am using linode with 512 mb ram Just killed my all day about working on this, i decided to switch to nginx with php5 fpm, because it will offer a better performance. But i think its not really... So i am using wordpress with few plugins, even tho all plugins are disabled, visiting wp-admin area is real pain, because it's too slow when i try to login. It even gives 502 bad gateway with connection reset by peer error. I installed wp super cache for giving a boost to site, frontend feels faster but still backend is still slow. If i switch to apache with php5, stuff gets faster, but when i use nginx with php5 fpm, things gets slower. I will attach my site.conf, i copy pasted it from a tutorial, so basicly permalinks etc works but still stuff is slower. I didnt had any experience with nginx before so i am not sure what is wrong. Attached Files conf.txt (2.6 KB, 105 views)

Posted by UNIXy, 06-29-2011, 04:18 PM
For dynamic pages, apache+mod_php/dso is going to be faster. It's a known fact. Regards

Posted by cedricd, 06-29-2011, 04:21 PM
UNIXy: It very well might be, but the OP shouldn't be experiencing the slowness he describes. Nginx is plenty fast

Posted by bonjurkes, 06-29-2011, 04:42 PM
it's written everywhere that wp will be faster with nginx + php5 fpm + apc + wp super cache. I have all of these but clearly when i switch apache2 things are faster, probably it's because wp super cache but still, even it's enabled at nginx, load time is longer and throws 502 gateway errors. I am not sure if it's because of some config values or something else

Posted by cedricd, 06-29-2011, 04:50 PM
If you're having gateway issues it sounds like a configuration error - I can't check at the moment because I'm on my phone.

Posted by bonjurkes, 06-29-2011, 04:51 PM
gateway issues may be because of keepalive, or max request or similar conf stuff. But i am just wondering is the "slowness" because of configuration or something wrong on somewhere

Posted by CoderJosh, 07-03-2011, 11:06 AM
Could you also show us your php-fpm configuration? Otherwise we don't know how many concurrent PHP processes you allow, etc. As a side note (that doesn't have anything to do with the performance issues you're dealing with), please check out http://flexichat.net/nginx-phpfcgi-easy-hacking and secure PHP-FPM. Otherwise your site might be vulnerable, in certain if you allow users/visitors to upload images.

Posted by goproxy, 08-18-2011, 12:05 AM
That gateway problems must be playing an important role here... it will be good to try to find the cause that problems and see if then the speed is the same or not.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Dathorn Support (Views: 771)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.