2

I am having a problem with Apache2 spawning processes that use 100% CPU.

Attaching strace to one of such processes produces no output sometimes and sometimes gives this:

2672  17:18:07 poll([{fd=14, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
2672  17:18:07 write(14, "\236\3\0\0\3SELECT FLOOR(((price_index."..., 930) = 930
2672  17:18:07 read(14, "\1\0\0\1\2\33\0\0\2\3def\0\0\0\5range\0\f?\0\r\0\0\0\10\0"..., 16384) = 85

I would be grateful for any ideas as to interpreting the above.

4
  • 1
    Are you running php? Is the strace made when the proces was using 100% CPU? What is recorded in the access log at the same time? Do you have an apache status page? Are you using compression, keep-alive, caching, mysql? Nov 14, 2011 at 19:13
  • Yes, Magento to be precise. Yes, strace is being attached while the process is at 100% CPU.
    – Stan
    Nov 15, 2011 at 7:49
  • Yes to MySQL, yes to keep-alive, no errors in log files, no compression. Status is disabled but I'll try it now. I now have a sneaking suspicion that this is related to a recent security update to Apache (USN-1259-1)
    – Stan
    Nov 15, 2011 at 7:55
  • It is interesting also the access log. Try to find out for which URL apache will use 100% CPU for long time (5 seconds for a response should be considered long these days). Nov 15, 2011 at 18:14

1 Answer 1

2

There is nothing crime. From the your output some script (mb php) create sql qury to db. You can crete much more info with using -s flag. E.g:

strace -pPID -s1024 > /tmp/mysql.pid.strace 2>&1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .