edge 发表于 2020-8-2 17:44:03

机器reboot后nginx没自动启动

经观察,vps reboot后nginx过几秒就自动挂了,然后手动service nginx restart就好了
脚本:lnmp1.7
系统debian10
报错信息如下:
● nginx.service - The NGINX HTTP and reverse proxy server
   Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sun 2020-08-02 17:21:04 CST; 3min 25s ago
Process: 460 ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf (code=killed, signal=TERM)

Aug 02 17:19:35 huluhost systemd: Starting The NGINX HTTP and reverse proxy server...
Aug 02 17:21:04 huluhost systemd: nginx.service: Start operation timed out. Terminating.
Aug 02 17:21:04 huluhost systemd: nginx.service: Control process exited, code=killed, status=15/TERM
Aug 02 17:21:04 huluhost systemd: nginx.service: Failed with result 'timeout'.
Aug 02 17:21:04 huluhost systemd: Failed to start The NGINX HTTP and reverse proxy server.

麻烦军哥看看:hug:

licess 发表于 2020-8-3 09:45:30

你机器什么配置,按提示是被killed,说明内存不够用

edge 发表于 2020-8-3 11:57:01

512MB小机,看来是内存不够了。但是环境跑起来后还有150mb左右的剩余。随便问问用lnmp1.7安装的denyhosts怎么卸载呢?谢谢军哥

edge 发表于 2020-8-3 11:57:18

licess 发表于 2020-8-3 09:45
你机器什么配置,按提示是被killed,说明内存不够用

看楼下:hug:

licess 发表于 2020-8-4 09:30:47

edge 发表于 2020-8-3 11:57
512MB小机,看来是内存不够了。但是环境跑起来后还有150mb左右的剩余。随便问问用lnmp1.7安装的denyhosts怎 ...

512MB的话有可能有其他比较占用内存的程序在运行

/etc/init.d/denyhosts stop
rm -f/usr/local/bin/denyhosts.py
rm -f /etc/denyhosts.conf
rm -f /etc/init.d/denyhosts

火花小红帽 发表于 2020-8-8 16:49:30

推荐楼主 nginx的各种入门细节可以看看这篇
https://kalasearch.cn/community/tutorials/how-to-install-nginx-on-ubuntu-20-04/
页: [1]
查看完整版本: 机器reboot后nginx没自动启动