I have a website with a custom script running on a VPS hosting service. All scripts go out through index.php using mod_rewrite and .htaccess for friendly URLs
Something in my script is generating high CPU Usage, as show:
When I go and strace
a given process I get this that I don't understand:
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={90, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0x7a6b8f, [PROF], SA_RESTORER|SA_RESTART, 0x2af8ae8742f0}, {0x7a6b8f, [PROF], SA_RESTORER|SA_RESTART, 0x2af8ae8742f0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
This is repeated continuously in an infinite loop.
What I need to know is how to track down the exact PHP script causing this problem. Any suggestions?
If you can get the PECL proctitle package into your PHP install, you can use that to make index.php
set its process title to the name of the script it handed off to. (The altered process title may or may not show up in particular process table visualizers; use ps
if all else fails.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With