doushang8512 2013-02-28 22:11
浏览 74

我的php脚本被OS自动杀死(DEBIAN)

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

I don't want it to be killed

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

  • 写回答

1条回答 默认 最新

  • duanpanhuo0618 2013-02-28 22:16
    关注

    What Apache error log says?

    If you have error:

    Fatal error: Maximum execution time of ...
    

    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; 
    }
    

    You may set this an option in php.ini file, its max_execution_time.

    评论

报告相同问题?

悬赏问题

  • ¥15 制裁名单20240508芯片厂商
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致