PHP脚本没有解释被杀 [英] PHP script is killed without explanation

查看:201
本文介绍了PHP脚本没有解释被杀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始我的PHP脚本以下列方式:

I'm starting my php script in the following way:

bash  
cd 'path'   
php -f 'scriptname'.php

有是PHP​​脚本运行时没有输出。

There is no output while the php script is running.

一段时间后,PHP脚本与响应:

After a time, the php script responds with:

Killed 

我的想法是,它达到了memory_limit的:的ini_set('memory_limit的','40960M');

增加内存限制似乎要解决的问题,但它只是增加了边缘

Increasing the memory limit seemed to solve the problem, but it only increased the edge.

究竟是什么终止句话是什么意思?

What exactly does that Killed phrase mean?

推荐答案

您进程被杀死。可能有多种原因,但它很容易丢弃一些比较明显的。

Your process is killed. There could be a multitude of reasons, but it's easy to discard some of the more obvious.


  • PHP的限制:如果碰上一个PHP的限制,你会在日志文件中得到一个错误,而且很可能在命令行上为好。这通常不打印'杀死'

  • 会话被端到问题:如果你仍然有你的会话,那么你的会话obvioiusly没有结束,所以不顾一切的nohup和&安培; 的东西

  • php limits: if you run into a php limit, you'll get an error in the logfile, and probably on the commandline as well. This normally does not print 'killed'
  • the session-is-ended-issues: if you still have your session, then your session is obvioiusly not ended, so disregard all the nohup and & stuff

如果您的服务器急需的资源(没有记忆,没有交换),内核可能会杀了你的进程。这可能是发生了什么。

If your server is starved for resources (no memory, no swap), the kernel might kill your process. This is probably what's happening.

在anycase:你的进程越来越发出一个信号,应立即停止。通常,只有一对夫妇的东西可以做到这一点。

In anycase: your process is getting send a signal that it should stop. Normally only a couple of 'things' can do this


  • 您的帐户(例如你杀的过程)

  • 管理员用户(例如根)

  • 内核,当它真的需要你的记忆本身。

  • 也许有些自动化的过程,例如,如果你住在共享服务器上,你需要更多的那么你的资源份额。

引用:谁"杀"我的过程,为什么?

这篇关于PHP脚本没有解释被杀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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