debugging long running PHP script

后端 未结 11 2512
我寻月下人不归
我寻月下人不归 2021-02-19 06:46

I have php script running as a cron job, extensively using third party code. Script itself has a few thousands LOC. Basically it\'s the data import / treatment script. (JSON to

11条回答
  •  借酒劲吻你
    2021-02-19 07:19

    Regular "top" command can show you, if CPU usage by php or mysql is bottleneck. If not, then delays may be caused by http calls.

    If CPU usage by mysqld is low, but constant, then it may be disk usage bottleneck.

    Also, you can check your bandwidth usage by installing and using "speedometer", or other tools.

提交回复
热议问题