Php-fpm take up all cpu resources

Hi All,

In these days, php-fpm took up all cpu resources several times a day…
Each php-fpm may take up 25% cpu resource which should be less than 5%
in normal status.
Below is the php-fpm.log.

[30-Mar-2013 22:18:47] NOTICE: about to trace 29600
[30-Mar-2013 22:18:47] NOTICE: finished trace of 29600
[30-Mar-2013 22:18:47] NOTICE: child 29599 stopped for tracing
[30-Mar-2013 22:18:47] NOTICE: about to trace 29599
[30-Mar-2013 22:18:47] ERROR: failed to ptrace(PT_IO) pid 29599: Bad
address (14)

At first, I though it’s caused by mysql. But when php-fpm took up all
cpu resource, I found that there is no sql process in mysql.
So I’m thinking this problem is caused by php-fpm.
I’m using Freebsd, and I disabled ‘ktrace’ in kernel. And the error for
php-fpm is that failed to ptrace(PT_IO).
Is it possible that this problem is caused by ktrace?
Anyone can help?

So I’m thinking this problem is caused by php-fpm.

This is not exactly php list and not really related to nginx, but you
should
start by at least telling your php version, there have been a bunch of
bugs
fixed regarding fpm and cpu hogging (also in php core itself) in past.

It can always be a poor php code (<? while(true) { } ?>) though but
without
the fpm backtrace it’s hard to tell.

rr