Debug lsphp process

Sani

New Member
#1
Hi

I am getting some problem on my vps.

On one of the domains, php script is giving request time out error due to going into an infinite loop. How could I debug or trace which files exactly are causing php loop?? (Or any info about it)

The vps itself is working fine, no problem with any other account. It's just one account that is giving headache.

when I do ps -aux | grep username
username 14481 0.0 0.3 214111 12422 ? S 05:52 0:00 lsphp5
username 14482 0.0 0.3 214111 12455 ? S 05:55 0:00 lsphp5
username 14483 0.0 0.3 214111 12466 ? S 05:57 0:00 lsphp5
.......

I can see 10 process from that user and their PIDs. How can I check which files/functions are causing the problwm.

I am using LiteSpeed 4.10 with Suhosin v0.9.29
 
Last edited:

NiteWave

Administrator
#2
>On one of the domains, php script is giving request time out error due to going into an infinite loop

a suggestion is to use xhprof(http://pecl.php.net/package/xhprof) to profile the question page(or URL)

another suggestion is to set "PHP suEXEC Max Conn" to 1, so one account only have 1 lsphp5 process. this will apply for all other accounts though.
 
Last edited:

ffeingol

Well-Known Member
#3
If the process are still running you can also use strace against the process. That will give you the system calls being issued (not the PHP code) but it should give you an idea of what it's doing.
 

Sani

New Member
#4
a suggestion is to use xhprof(pecl.php.net/package/xhprof) to profile the question page(or URL)
I am looking into it but it seems beyong my understanding. (I will try though)

If the process are still running you can also use strace against the process. That will give you the system calls being issued (not the PHP code) but it should give you an idea of what it's doing.
I actally tried to use it first. But since I have never done that before, I dont think I was able to get anything out of it.

How will i use it??
strace -p 14481
(where 14481 is pid of one lsphp5 process the client is running)
The user is running 10 process so 10 pids.
Will appreciate your help.
 
Top