简体   繁体   English

运行php脚本的进程不会以长期执行结束

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

The Kohan task is executed, which in the __executemethod contains the following lines:执行 Kohan 任务,在 __executemethod 中包含以下几行:

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.在这种情况下,退出前会在日志中写入一条消息(SOME MESSAGE),但启动此任务的进程并未完成。 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 Kohana 版本是 3.3.6 php 版本是 5.6 OS 版本是 Ubuntu 18.04 桌面

  1. CLI scripts ignore max_execution_time CLI 脚本忽略 max_execution_time
  2. Dont use die/exit in controller or task不要在控制器或任务中使用 die/exit
  3. you need store execution status and check it before execution您需要存储执行状态并在执行前检查它

use https://github.com/WinterSilence/kohana-cli - it's minion +.使用https://github.com/WinterSilence/kohana-cli - 它是minion +。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM