开发者社区 问答 正文

php死循环在独享主机上不能一直跑

因为业务需要,写了一个死循环用于网站的实时检测.本地apache跑一天都没问题.放到独享主机上面,跑半个小时就自己停了,试了好几次都是这样.下面是代码:
ignore_user_abort(true);
set_time_limit(0);
while(1){
   Common::order_notice();
   time_sleep_until(time()+60);
}
下面是错误信息:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@syu4615460001.my3w.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

展开
收起
1023826349911945 2018-08-23 09:23:36 706 分享 版权
1 条回答
写回答
取消 提交回答
  • 您参考下链接:
    https://help.aliyun.com/knowledge_detail/36474.html?spm=5176.11065259.1996646101.searchclickresult.49c96181OTSsOD
    https://help.aliyun.com/knowledge_detail/36452.html?spm=5176.11065259.1996646101.searchclickresult.49c96181OTSsOD
    2018-08-23 09:26:58
    赞同 展开评论
问答标签:
问答地址: