SandyBr
SandyBr

Reputation: 11989

php5-fpm high server load

I'm running a ubuntu vserver with nginx+php. With "htop" I see a high CPU usage of php5-fpm:

 PID    user    PRI  NI VIRT  RES   SHR  S  CPU%  MEM%  TIME+   Command
20513 www-data  20   0  229M 67980 35324 S  42.0  3.3  1:00.60 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/main.conf 

How can I determine which .php file is responsible for the server load? How can I monitor this for the next time? Thanks

Upvotes: 0

Views: 1664

Answers (2)

Paul Scheltema
Paul Scheltema

Reputation: 2043

Use XDebug extension and write the debug file, use WinCacheGrind to view the debug files

Upvotes: 0

niczak
niczak

Reputation: 3917

There isn't a native method for doing this in PHP so I would try phpSysInfo as it provides information on CPU, uptime, ethernet, SCSI, IDE, etc. http://phpsysinfo.sourceforge.net/ A combination of the information this utility provides should help you isolate what might be causing PHP to spike so high.

Upvotes: 1

Related Questions