-
Nginx + php5-fpm performance issues
Hi everyone,
I am running a high traffic site with some friends and recently we switched from Apache to Nginx. We're having huge performance issues since then. When we hit about 300 visitors the site starts to load very slow. It can take about 10+ seconds for a page to load.
It only seems to be pages with PHP that loads slowly. We don't have the same issues on pages with pure HTML.
The php5-fpm.log is filled with error messages like this:
[13-Nov-2012 20:33:53] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 68 total children
[13-Nov-2012 20:33:54] WARNING: [pool www] server reached pm.max_children setting (70), consider raising it
We've tried to increase those values a lot, but that didn't do the trick.
Here's how our Nginx conf-file looks like for the moment:
http://pastie.org/private/z34p8ptvbvx0ss0yaxoa
Here's how our php5-fpm pool conf looks like:
http://pastie.org/private/egidjh4v7is492zoqr1g1w
Any help with this would really be appreciated!
-
Re: Nginx + php5-fpm performance issues
Hello
I had the same problem, and my config is mostly the same as yours.
I just tested with siege and changing
pm = dynamic
to
pm = static
seems to have fixed it.
The image below, first spike, php5-fpm hanged with 502 gateway timeout, the second spike the process recovered.

Hope this helps you too.
Riaan
-
Re: Nginx + php5-fpm performance issues
Thanks a lot for the tip! Changed to static and reduced the number of childrens a bit and voila! Huge difference! 
Will try to tweak it even more, but the site's load time is more than acceptabel now during high load.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks