PHP导致服务器关闭

时间:2017-12-28 16:15:24

标签: php server crash garbage-collection resource-cleanup

我有一台带4Gb RAM的centos服务器。 我正在做一个可能需要几个小时的PHP控制台批处理过程...但是在完成该过程1或2个小时后服务器关闭时它没有完成... 这是日志:

    Dec 28 04:39:01 www systemd[1]: Starting Clean php session files...
    Dec 28 04:39:02 www systemd[1]: Started Clean php session files.
    Dec 28 04:40:04 www systemd[1]: Stopped target Mail Transport Agent.
    Dec 28 04:40:04 www systemd[1]: Stopped target Timers.
    Dec 28 04:40:04 www systemd[1]: Stopping User Manager for UID 0...
    Dec 28 04:40:04 www systemd[1]: Stopping Session 12236053 of user root.
    Dec 28 04:40:04 www systemd[1]: Stopped Daily apt upgrade and clean activities.
    Dec 28 04:40:04 www systemd[24724]: Stopped target Default.
    Dec 28 04:40:04 www systemd[24724]: Stopped target Basic System.
    Dec 28 04:40:04 www systemd[24724]: Stopped target Sockets.
    Dec 28 04:40:04 www systemd[24724]: Reached target Shutdown.
    Dec 28 04:40:04 www systemd[24724]: Starting Exit the Session...
    Dec 28 04:40:04 www systemd[24724]: Stopped target Timers.
    Dec 28 04:40:04 www systemd[24724]: Stopped target Paths.
    Dec 28 04:40:04 www systemd[1]: Stopping Session 12226070 of user root.
    Dec 28 04:40:04 www systemd[1]: Stopped Run certbot twice daily.
    Dec 28 04:40:04 www systemd[1]: Stopped Daily apt download activities.
    Dec 28 04:40:04 www systemd[1]: Stopped Clean PHP session files every 30 mins.
    Dec 28 04:40:04 www systemd[1]: Stopped Daily Cleanup of Temporary Directories.
    Dec 28 04:40:04 www systemd[1]: Stopped target Graphical Interface.
    Dec 28 04:40:04 www systemd[1]: Stopped target Multi-User System.
    Dec 28 04:40:04 www systemd[1]: Stopped target Login Prompts.
    Dec 28 04:40:04 www systemd[1]: Stopping Console Getty...
    Dec 28 04:40:04 www systemd[1]: Stopping Getty on tty2...
    Dec 28 04:40:04 www systemd[1]: Stopping LSB: modules.dep creation....
    Dec 28 04:40:04 www systemd[1]: Stopping Unattended Upgrades Shutdown...
    Dec 28 04:40:04 www systemd[1]: Stopping OpenBSD Secure Shell server...
    Dec 28 04:40:04 www systemd[1]: Stopping LSB: Record successful boot for GRUB...
    Dec 28 04:40:04 www systemd[1]: Stopping LSB: Start/stop sysstat's sadc...
    Dec 28 04:40:04 www systemd[1]: Stopping A high performance web server and a reverse proxy server...
    Dec 28 04:40:04 www systemd[1]: Stopping Regular background program processing daemon...
    Dec 28 04:40:04 www systemd[1]: Stopping Runit service supervision...
    Dec 28 04:40:04 www systemd[1]: Stopping D-Bus System Message Bus...
    Dec 28 04:40:04 www systemd[24724]: Received SIGRTMIN+24 from PID 11820 (kill).
    Dec 28 04:40:04 www systemd[1]: Stopping LSB: Starts or stops the xinetd daemon....
    Dec 28 04:40:04 www systemd[1]: Stopping LSB: Postfix Mail Transport Agent...
    Dec 28 04:40:04 www systemd[1]: Stopping The PHP 7.0 FastCGI Process Manager...
    Dec 28 04:40:04 www systemd[1]: Stopping vsftpd FTP server...
    Dec 28 04:40:04 www rsyslogd: [origin software="rsyslogd" swVersion="8.20.0" x-pid="370" x-info="http://www.rsyslog.com"] exiting on signal 15.

它启动干净的php会话文件然后突然停止所有服务并关闭!

我的代码似乎没问题......我是否需要强制清除代码上的变量?

有什么问题?

由于

0 个答案:

没有答案