High server load

Kornél Schadl neil at krnl.hu
Mon Jun 13 21:03:29 MSD 2011

it's mostly php and mysql related not nginx.

try to debug the php code that is running (f.e. with xhprof to check
which part of the code consumes the cpu time) and search for slow
queries in mysql (you should enable logging slow queries in mysql's
configuration). then you should optimize php code and sql queries
(first try with

'show processlist' as an sql query can help you bring closer to the
solution quickly. adding indexes to tables can be a quick fix to most
of sql related performance issues if not already added and the queries
seem ok.

gl, kornel

On Mon, Jun 13, 2011 at 6:53 PM, hlds <nginx-forum at nginx.us> wrote:
> Sometimes my website is down due to high server load.
> htop screenshot:
> http://img703.imageshack.us/img703/4042/highcpupad.png
> Sometimes there are php5-fpm processes that take 100% CPU. Why? It
> slowes down everything. I also get mysql database errors (too many
> connections).
> How can I determine what causes this?
> thanks
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,206471,206471#msg-206471
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

More information about the nginx mailing list