php5-fpm high server load
I'm running a ubuntu vserver with nginx+php. With "htop" I see a high CPU usa开发者_Python百科ge 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
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.
Use XDebug extension and write the debug file, use WinCacheGrind to view the debug files
精彩评论