Welcome! Log In Create A New Profile

Advanced

Re: High server load

Kornél Schadl
June 13, 2011 01:04PM
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
http://dev.mysql.com/doc/refman/5.0/en/using-explain.html).

'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@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@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

High server load

hlds June 13, 2011 12:53PM

Re: High server load

hlds June 13, 2011 12:55PM

Re: High server load

Kornél Schadl June 13, 2011 01:04PM

Re: High server load

Kornél Schadl June 13, 2011 01:06PM

Re: High server load

spwap.net sp June 13, 2011 03:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 319
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready