process - How to troubleshoot PHP processes -
I created a script in PHP for a small shop that did some things.
Start a DB connection, and ask DB twice. Request for PayPal PDT with Read / Write sessions, parse results with fsockopen () Save DB command
After some testing, the server stopped loading Support I know that 20 PHP procedures were running (which was the limit) for some reason, they are not shutting down properly
User PID% CPU% MEM VSZ RSS TTV State Start Time Command Bubseu 970 0.0 0.1 23836 8708? S 15:46 0:00 /usr/local/bin/php5.cgi index.php Bobisse 1574 0.0 0.1 23836 8708? S 15:47 0:00 /usr/local/bin/php5.cgi index.php Bobsize 2328 0.0 0.1 23840 8708? S 15:47 0:00 / URL / LOC / Bean / FP5 CCI Index.FP Bobisue 4031 0.0 0.1 23836 8704? S 15:49 0:00 / URL / LOC / Bean / FP 05 cc Index. FP Bobbişseu 7112 0.0 0.1 23836 8708? S 15:51 0:00 / url / lock / bean / fp 05.cgi index.php ...
1) To see how the problem can lie, How can I get rid of? 2) How can I ensure that startups will end properly? Thanks Rich
You can use a PHP debugger.
DBG is a very good one. I use PHPEd, but I believe DBG will also work in other ways.
Some other decent free or pass-free PHP debugging options:
Or, if These are daemon processes or are not running in a browser, so you will be likely to go along with writing information in the log file. I'm not sure they can be debugged - check Google.
Edit
The comment has been suggested, XDebug looks great.
Update 2
It seems that you can still debug php-cli with DBG.
Comments
Post a Comment