我的php脚本由操作系统(DEBIAN)自动杀死 [英] My php script is killed automatically by the OS (DEBIAN)

查看:193
本文介绍了我的php脚本由操作系统(DEBIAN)自动杀死的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个PHP操作系统(debian)10分钟后被杀死的脚本。

I have a php script that is killed after 10 minutes by the OS (debian)

我不希望被杀死

有人告诉我,我的服务器可能有一个任务监视器,可以将长时间运行的进程作为防止锁定的安全措施。

Someone told me that my server maybe has a task monitor that kills long-running processes as a safeguard against lockups.

不知道如何访问任务监视器以及如何禁用它。

I don't know how to access to the task monitor and how to disable it

推荐答案

Apache错误日志中显示什么?

What Apache error log says?

如果您有错误:

Fatal error: Maximum execution time of ...

那么你必须关闭PHP脚本执行时间的限制,可以设置像这样:

then you have to turn off limit for PHP script execution time, which can be set like this:

set_time_limit(0); // limit in seconds, 0 for unlimited

while (1)// test loop
{
    $a = 0; 
}

您可以在 php.ini中设置此选项档案,其 max_execution_time

这篇关于我的php脚本由操作系统(DEBIAN)自动杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆