VPS 经常出现无法连接到数据库的错误,重启之后又好了? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
linfox

VPS 经常出现无法连接到数据库的错误,重启之后又好了?

  •  
  •   linfox Nov 9, 2014 4559 views
    This topic created in 4187 days ago, the information mentioned may be changed or developed.
    以下是数据库日志,请帮忙分析下:
    -------------------------------------------------


    Number of processes running now: 0
    141104 23:25:13 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141104 23:25:13 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141104 23:25:14 InnoDB: Started; log sequence number 0 398119697
    141104 23:25:14 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 01:14:29 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 1:14:30 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 1:14:33 InnoDB: Started; log sequence number 0 398224842
    141105 1:14:33 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 01:16:55 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 1:16:55 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 1:16:56 InnoDB: Started; log sequence number 0 398224842
    141105 1:16:56 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 01:17:26 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 1:17:26 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 1:17:27 InnoDB: Started; log sequence number 0 398224842
    141105 1:17:27 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 11:14:12 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 11:14:22 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 11:14:23 InnoDB: Started; log sequence number 0 398473823
    141105 11:14:23 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 19:13:17 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 19:13:18 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 19:13:19 InnoDB: Started; log sequence number 0 398473823
    141105 19:13:20 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:47:39 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:48:00 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:48:00 InnoDB: Started; log sequence number 0 398598629
    141105 23:48:00 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:48:35 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:48:35 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:48:36 InnoDB: Started; log sequence number 0 398598629
    141105 23:48:36 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:49:23 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:49:24 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:49:24 InnoDB: Started; log sequence number 0 398598629
    141105 23:49:24 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:50:18 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:50:19 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:50:21 InnoDB: Started; log sequence number 0 398598629
    141105 23:50:22 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:51:10 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:51:10 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:51:11 InnoDB: Started; log sequence number 0 398598629
    141105 23:51:11 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:51:31 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:51:32 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:51:33 InnoDB: Started; log sequence number 0 398598629
    141105 23:51:33 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:52:00 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:52:00 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:52:01 InnoDB: Started; log sequence number 0 398598629
    141105 23:52:01 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:52:48 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:52:48 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:52:50 InnoDB: Started; log sequence number 0 398598629
    141105 23:52:53 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:54:35 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:54:40 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:54:41 InnoDB: Started; log sequence number 0 398598629
    141105 23:54:41 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:56:56 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:56:57 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:57:12 InnoDB: Started; log sequence number 0 398598629
    141105 23:57:13 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:57:51 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:57:51 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:57:52 InnoDB: Started; log sequence number 0 398598629
    141105 23:57:52 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:59:06 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:59:06 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:59:07 InnoDB: Started; log sequence number 0 398598629
    141105 23:59:07 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141105 23:59:56 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141105 23:59:56 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141105 23:59:57 InnoDB: Started; log sequence number 0 398598629
    141105 23:59:57 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141106 00:00:46 mysqld restarted
    InnoDB: Log scan progressed past the checkpoint lsn 0 398598629
    141106 0:00:48 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    141106 00:01:14 mysqld ended

    141107 06:41:30 mysqld started
    InnoDB: Log scan progressed past the checkpoint lsn 0 398598629
    141107 6:41:30 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    InnoDB: Doing recovery: scanned up to log sequence number 0 398598639
    141107 6:41:31 InnoDB: Started; log sequence number 0 398598639
    141107 6:41:31 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141107 12:24:01 mysqld restarted
    InnoDB: Log scan progressed past the checkpoint lsn 0 398834656
    141107 12:24:02 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    InnoDB: Doing recovery: scanned up to log sequence number 0 398939488
    141107 12:24:03 InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
    InnoDB: Apply batch completed
    141107 12:24:05 InnoDB: Started; log sequence number 0 398939488
    141107 12:24:06 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141107 12:27:50 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141107 12:27:50 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141107 12:27:51 InnoDB: Started; log sequence number 0 398939575
    141107 12:27:51 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141107 12:30:45 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141107 12:30:48 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141107 12:30:49 InnoDB: Started; log sequence number 0 398939575
    141107 12:30:49 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

    Number of processes running now: 0
    141107 12:33:01 mysqld restarted
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141107 12:33:01 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    141107 12:33:32 mysqld ended

    141108 17:49:49 mysqld started
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    141108 17:49:49 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    141108 17:49:49 InnoDB: Started; log sequence number 0 398939575
    141108 17:49:49 [Note] /usr/libexec/mysqld: ready for connections.
    Version: '5.0.96' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
    5 replies    2014-11-19 17:05:09 +08:00
    a2z
        1
    a2z  
       Nov 9, 2014
    mysql内存不足
    lazycat
        2
    lazycat  
       Nov 9, 2014 via Android
    喜闻乐见的问题。。。目测Apache占用太多内存然后Mysql被kill了
    hjc4869
        3
    hjc4869  
       Nov 9, 2014
    mysql被系统kill了。换大RAM的VPS,或者,最简单的方法是把mysql进程的oom_score调成0即可……
    楼主的情况很有可能是被DDoS了。
    manan
        4
    manan  
       Nov 9, 2014
    增加系统swap空间可以缓解
    ddnet02
        5
    ddnet02  
       Nov 19, 2014
    @hjc4869 请问怎么"把mysql进程的oom_score调成0",新手不懂
    About     Help     Advertise     Blog     API     FAQ     Solana     6012 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 84ms UTC 06:32 PVG 14:32 LAX 23:32 JFK 02:32
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86