V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
o618
V2EX  ›  问与答

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

  •  
  •   o618 · 2014-02-25 12:20:35 +08:00 · 3057 次点击
    这是一个创建于 3919 天前的主题,其中的信息可能已经有所发展或是发生改变。
    报错:500: Internal Server Error
    看日志貌似是mysql出错,但我没改数据库数据啊
    11 条回复    1970-01-01 08:00:00 +08:00
    justfindu
        1
    justfindu  
       2014-02-25 12:21:33 +08:00
    没重启nginx或者之类的进程吧
    shiny
        2
    shiny  
       2014-02-25 12:21:34 +08:00
    不贴具体错误日志都是耍流氓
    o618
        3
    o618  
    OP
       2014-02-25 12:25:46 +08:00
    @justfindu 重启服务器nginx和mysql都会一起重启吧,我看了下nginx和supervisor都正常
    o618
        4
    o618  
    OP
       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
        5
    o618  
    OP
       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
        6
    shiny  
       2014-02-25 12:34:46 +08:00   ❤️ 1
    @o618 从这个MySQL的日志看是很正常的吧,你应该看程序的错误日志吧。
    shiny
        7
    shiny  
       2014-02-25 12:35:21 +08:00   ❤️ 1
    如果程序没有错误就看nginx的日志
    o618
        8
    o618  
    OP
       2014-02-25 12:42:43 +08:00
    nginx日志没有报错
    Jat001
        9
    Jat001  
       2014-02-25 12:44:04 +08:00   ❤️ 1
    如果 nginx 没有打开,会连接不上,更不会报什么状态码。
    如果后端程序没有打开,或因为种种原因连接不上,会报 502。如果与后端程序连接超时,会报 504。
    只有后端程序出现问题,比如连接不上数据库等,才会报 500,这时后端程序应该处于运行状态。
    o618
        10
    o618  
    OP
       2014-02-25 12:49:06 +08:00
    我之前用了UFW封了端口,但这只是封了外部访问的端口,和程序内部调用端口应该无关吧
    Jat001
        11
    Jat001  
       2014-02-25 12:49:10 +08:00
    @Jat001 当然,500 也不排除是 nginx 自身出现问题,但这种情况不太常见,一般是后端程序报的,
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1459 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 17:26 · PVG 01:26 · LAX 09:26 · JFK 12:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.