A large third-party PHP application is taking a very long time (multiple seconds) to process a certain POST request. I need to find out what is taking so long.
In the Java land, taking a few thread dumps would often (not always) tell you where the program is stuck. Can I do something similar in PHP?
The debug_backtrace()
function would not help in this situation, because I so not have a specific place in the PHP code where I would put debug_backtrace()
call. Instead, I want PHP code to start executing, then dump a stack trace approximately 2 seconds into execution.