How to log/pinpoint which PHP script uses a lot of memory? Optimization Question
-
06-07-2019 - |
Question
I wrote a small app that turns out to be using a lot of memory when used by a few users simultaniously. This is leading to some Fatal PHP errors and some mySQL (errcode 12) errors.
My Plesk QoS page shows frequent 'kmemsize' black zone errors.
My question is: What's the best method to monitor PHP script runs to pin-point which .php script is using the most memory? Shell command? Debugger?
Thanks in advance :)
Solution
Try running a profiler on it.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow