the process running the php script does not end with long-term execution

93 Views Asked by At

The Kohan task is executed, which in the __executemethod contains the following lines:

Kohana::$log->add(LOG::NOTICE, "SOME MESSAGE");
exit;

In this case, a message (SOME MESSAGE) is written to the log before the exit, but the process that launched this task is not completed. However, this only happens with prolonged performance (about or more than an hour). Kohana version is 3.3.6 php version is 5.6 OS verion is Ubuntu 18.04 desktop

1

There are 1 best solutions below

1
WinterSilence On BEST ANSWER
  1. CLI scripts ignore max_execution_time
  2. Dont use die/exit in controller or task
  3. you need store execution status and check it before execution

use https://github.com/WinterSilence/kohana-cli - it's minion+.