为什么重新上传重启服务器后,网站就挂掉了?

2014-02-25 12:20:35 +08:00
 o618
报错:500: Internal Server Error
看日志貌似是mysql出错,但我没改数据库数据啊
3057 次点击
所在节点    问与答
11 条回复
justfindu
2014-02-25 12:21:33 +08:00
没重启nginx或者之类的进程吧
shiny
2014-02-25 12:21:34 +08:00
不贴具体错误日志都是耍流氓
o618
2014-02-25 12:25:46 +08:00
@justfindu 重启服务器nginx和mysql都会一起重启吧,我看了下nginx和supervisor都正常
o618
2014-02-25 12:26:11 +08:00
140225 11:54:30 [Note] /usr/sbin/mysqld: Normal shutdown

140225 11:54:30 [Note] Event Scheduler: Purging the queue. 0 events
140225 11:54:32 [Warning] /usr/sbin/mysqld: Forcing close of thread 40 user: 'root'

140225 11:54:32 [Warning] /usr/sbin/mysqld: Forcing close of thread 39 user: 'root'

140225 11:54:32 [Warning] /usr/sbin/mysqld: Forcing close of thread 38 user: 'root'

140225 11:54:32 [Warning] /usr/sbin/mysqld: Forcing close of thread 37 user: 'root'

140225 11:54:32 InnoDB: Starting shutdown...
140225 11:54:34 InnoDB: Shutdown completed; log sequence number 1713091
140225 11:54:34 [Note] /usr/sbin/mysqld: Shutdown complete

140225 11:55:14 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140225 11:55:14 [Note] Plugin 'FEDERATED' is disabled.
140225 11:55:14 InnoDB: The InnoDB memory heap is disabled
140225 11:55:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140225 11:55:14 InnoDB: Compressed tables use zlib 1.2.3.4
140225 11:55:14 InnoDB: Initializing buffer pool, size = 128.0M
140225 11:55:14 InnoDB: Completed initialization of buffer pool
140225 11:55:14 InnoDB: highest supported file format is Barracuda.
140225 11:55:14 InnoDB: Waiting for the background threads to start
140225 11:55:15 InnoDB: 5.5.35 started; log sequence number 1713091
140225 11:55:15 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
140225 11:55:15 [Note] - '127.0.0.1' resolves to '127.0.0.1';
140225 11:55:15 [Note] Server socket created on IP: '127.0.0.1'.
140225 11:55:16 [Note] Event Scheduler: Loaded 0 events
140225 11:55:16 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.35-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
140225 12:03:40 [Note] /usr/sbin/mysqld: Normal shutdown

140225 12:03:40 [Note] Event Scheduler: Purging the queue. 0 events
140225 12:03:42 [Warning] /usr/sbin/mysqld: Forcing close of thread 40 user: 'root'

140225 12:03:42 [Warning] /usr/sbin/mysqld: Forcing close of thread 39 user: 'root'

140225 12:03:42 [Warning] /usr/sbin/mysqld: Forcing close of thread 38 user: 'root'

140225 12:03:42 [Warning] /usr/sbin/mysqld: Forcing close of thread 37 user: 'root'

140225 12:03:42 InnoDB: Starting shutdown...
140225 12:03:43 InnoDB: Shutdown completed; log sequence number 1713101
140225 12:03:43 [Note] /usr/sbin/mysqld: Shutdown complete

140225 12:04:21 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140225 12:04:21 [Note] Plugin 'FEDERATED' is disabled.
140225 12:04:21 InnoDB: The InnoDB memory heap is disabled
140225 12:04:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140225 12:04:21 InnoDB: Compressed tables use zlib 1.2.3.4
140225 12:04:21 InnoDB: Initializing buffer pool, size = 128.0M
140225 12:04:21 InnoDB: Completed initialization of buffer pool
140225 12:04:21 InnoDB: highest supported file format is Barracuda.
140225 12:04:21 InnoDB: Waiting for the background threads to start
140225 12:04:22 InnoDB: 5.5.35 started; log sequence number 1713101
140225 12:04:22 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
140225 12:04:22 [Note] - '127.0.0.1' resolves to '127.0.0.1';
140225 12:04:22 [Note] Server socket created on IP: '127.0.0.1'.
140225 12:04:22 [Note] Event Scheduler: Loaded 0 events
140225 12:04:22 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.35-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
o618
2014-02-25 12:32:32 +08:00
好像是supervisor没有加载程序。。。
2014-02-25 12:04:21,283 CRIT Server 'unix_http_server' running without any HTTP authentication checking
shiny
2014-02-25 12:34:46 +08:00
@o618 从这个MySQL的日志看是很正常的吧,你应该看程序的错误日志吧。
shiny
2014-02-25 12:35:21 +08:00
如果程序没有错误就看nginx的日志
o618
2014-02-25 12:42:43 +08:00
nginx日志没有报错
Jat001
2014-02-25 12:44:04 +08:00
如果 nginx 没有打开,会连接不上,更不会报什么状态码。
如果后端程序没有打开,或因为种种原因连接不上,会报 502。如果与后端程序连接超时,会报 504。
只有后端程序出现问题,比如连接不上数据库等,才会报 500,这时后端程序应该处于运行状态。
o618
2014-02-25 12:49:06 +08:00
我之前用了UFW封了端口,但这只是封了外部访问的端口,和程序内部调用端口应该无关吧
Jat001
2014-02-25 12:49:10 +08:00
@Jat001 当然,500 也不排除是 nginx 自身出现问题,但这种情况不太常见,一般是后端程序报的,

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/101751

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX