How to keep a php script from timing out because of a long mysql query

后端 未结 5 1804
盖世英雄少女心
盖世英雄少女心 2020-12-29 11:07

I have an update query being run by a cron task that\'s timing out. The query takes, on average, five minutes to execute when executed in navicat.

The code looks ro

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 11:19

    Assuming you are on linux, Debian based systems have separate configurations for mod_php/php cgi and php-cli. This shouldn't be too difficult to set up on a different linux system that doesn't separate cgi/cli configuration.

    Once you have separate configs, I would adjust your php cli configuration. Disable safe mode and any time limits and ram limits.

提交回复
热议问题