我正在运行 nginx,php 作为 fastcgi。我的网站有时会崩溃,需要重新启动 nginx 才能再次运行。我在错误日志中发现以下内容(出于隐私原因,实际 IP 已被替换)。有人能解释一下到底发生了什么吗?谢谢
2011/05/02 06:41:10 [alert] 1686#0: worker process 1690 exited on signal 9
2011/05/02 06:41:20 [emerg] 25259#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/05/02 06:41:20 [emerg] 25259#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/05/29 14:01:08 [alert] 25260#0: worker process 25264 exited on signal 9
2011/05/29 14:01:13 [emerg] 24852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/05/29 14:01:13 [emerg] 24852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/06/16 10:10:23 [alert] 24856#0: *14222020 write() to "/var/log/nginx/access.log" was incomplete: 243 of 247 while closing request, client: 123.45.67.89, server: a$
2011/06/16 10:11:27 [alert] 24856#0: *14222228 write() to "/var/log/nginx/access.log" failed (28: No space left on device) while closing request, client: 123.45.67.89,$
2011/06/16 10:12:34 [alert] 24856#0: *14222361 write() to "/var/log/nginx/access.log" failed (28: No space left on device) while closing request, client: 123.45.67.89,$
2011/06/16 10:13:12 [emerg] 7394#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/06/16 10:13:12 [emerg] 7394#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/06/16 10:13:12 [emerg] 7394#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/06/16 10:13:12 [emerg] 7394#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/06/16 10:13:12 [emerg] 7394#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/06/16 10:13:12 [emerg] 7394#0: still could not bind()
答案1
bind() 到 0.0.0.0:80 失败 - 这意味着它无法绑定到端口 80,这通常意味着其他一些应用程序正在使用端口 80,您是否有可能同时意外地在此机器上运行了 apache?
14222228 write() 到“/var/log/nginx/access.log”失败(28:设备上没有剩余空间) - 通常意味着写入日志的卷上的磁盘已满,最好检查硬盘空间使用情况并根据需要清理旧文件或旧日志文件