070924  8:50: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...
070924  8:50:50  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1300105255.
InnoDB: Doing recovery: scanned up to log sequence number 0 1300108358
070924  8:50:50  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
070924  8:50:50  InnoDB: Started; log sequence number 0 1300108358
070924  8:50:51 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
070926  9:43: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...
070926  9:43:58  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1343369950.
InnoDB: Doing recovery: scanned up to log sequence number 0 1343372896
070926  9:43:58  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
070926  9:43:59  InnoDB: Started; log sequence number 0 1343372896
070926  9:44:00 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
071020 23:15:16  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...
071020 23:15:17  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1763069163.
InnoDB: Doing recovery: scanned up to log sequence number 0 1763071222
071020 23:15:17  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
071020 23:15:17  InnoDB: Started; log sequence number 0 1763071222
071020 23:15:18 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
071021 16:19:28  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...
071021 16:19:29  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1773473195.
InnoDB: Doing recovery: scanned up to log sequence number 0 1773479717
071021 16:19:29  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
071021 16:19:30  InnoDB: Started; log sequence number 0 1773479717
071021 16:19:31 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
071022  2:00:05  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...
071022  2:00:05  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1778696389.
InnoDB: Doing recovery: scanned up to log sequence number 0 1778696389
071022  2:00:06  InnoDB: Started; log sequence number 0 1778696389
071022  2:00:06 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
071022 17:04:43  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...
071022 17:04:44  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1783748314.
InnoDB: Doing recovery: scanned up to log sequence number 0 1783750527
071022 17:04:44  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
071022 17:04:45  InnoDB: Started; log sequence number 0 1783750527
071022 17:04:45 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)

解决方案 »

  1.   

    看一看是不是在哪里不小心调用了关闭mysql数据的函数
      

  2.   

    以前的程序用没有使用过mysql_close()
    基本上这种情况会十来天就出现,然后就是出现链接不上数据库的情况,
    进程中mysql在运行,命令行也链接不上
      

  3.   

    要彻底解决问题就把程序一个个测试检查,找出出问题的代码在哪儿。要搞不定的话,试试这个变通的方法:1.如果非必要,把数据库设为MyIsam类型。
    2.数据库连接全替换为mysq_pconnect
    3.每天凌晨4点左右(或者其他人数极少的时候)重启一次服务器。
      

  4.   

    快崩溃了,又挂了,附上我的错误日志,大哥们 有空帮我看看吧 
    前几天更改了一次服务器my.ini配置 但是出问题了 恢复不了 又改回去了 但数据库还是崩溃中恢复就需要半天时间
    071110 11:50: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...
    071110 11:50:31  InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 2162177208.
    InnoDB: Doing recovery: scanned up to log sequence number 0 2162180467
    071110 11:50:31  InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 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
    071110 11:50:31  InnoDB: Started; log sequence number 0 2162180467
    071110 11:50:32 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
    Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
    071112  9:06:12  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...
    071112  9:06:13  InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 2190317300.
    InnoDB: Doing recovery: scanned up to log sequence number 0 2190320848
    071112  9:06:13  InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 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
    071112  9:06:14  InnoDB: Started; log sequence number 0 2190320848
    071112  9:06:14 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
    Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
    071113 20:21:59 [Note] D:\mysql\bin\mysqld-nt: Normal shutdown071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 951  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 950  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 945  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 943  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 936  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 509  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 478  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 442  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 425  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 423  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 422  user: 'apparelsos'071113 20:22:02 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 421  user: 'apparelsos'071113 20:22:02  InnoDB: Starting shutdown...
    071113 20:22:04  InnoDB: Shutdown completed; log sequence number 0 2225283300
    071113 20:22:04 [Note] D:\mysql\bin\mysqld-nt: Shutdown complete071113 21:05:28  InnoDB: Started; log sequence number 0 2225283300
    071113 21:05:29 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
    Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
    071115 21:28:36 [Note] D:\mysql\bin\mysqld-nt: Normal shutdown071115 21:28:39 [Warning] D:\mysql\bin\mysqld-nt: Forcing close of thread 380  user: 'apparelsos'071115 21:28:39  InnoDB: Starting shutdown...
    071115 21:28:42  InnoDB: Shutdown completed; log sequence number 0 2259930038
    071115 21:28:42 [Note] D:\mysql\bin\mysqld-nt: Shutdown complete071115 22:21:31  InnoDB: Started; log sequence number 0 2259930038
    071115 22:21:31 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
    Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
    071121 14:46:38  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...
    071121 14:46:39  InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 2363501120.
    InnoDB: Doing recovery: scanned up to log sequence number 0 2363501367
    071121 14:46:40  InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 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
    071121 14:46:40  InnoDB: Started; log sequence number 0 2363501367
    071121 14:46:40 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
    Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
    InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
    InnoDB: than specified in the .cnf file 0 20971520 bytes!
    071128 14:17:13 [ERROR] Default storage engine (InnoDB) is not available
    071128 14:17:13 [ERROR] Aborting071128 14:17:13 [Note] D:\mysql\bin\mysqld-nt: Shutdown completeInnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
    InnoDB: than specified in the .cnf file 0 20971520 bytes!
    071128 19:15:52 [ERROR] Default storage engine (InnoDB) is not available
    071128 19:15:52 [ERROR] Aborting071128 19:15:52 [Note] D:\mysql\bin\mysqld-nt: Shutdown complete071129  2:33:47  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...
    071129  2:33:49  InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 2460319063.
    InnoDB: Doing recovery: scanned up to log sequence number 0 2460323875
    071129  2:33:49  InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 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
    071129  2:33:49  InnoDB: Started; log sequence number 0 2460323875
    071129  2:33:50 [Note] D:\mysql\bin\mysqld-nt: ready for connections.
    Version: '5.0.26-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
      

  5.   

    服务器配置是 win2003 intel xeon(Tm)2.8GCpu 1G内存
    以下是my.ini的配置  
    max_connections=500
    query_cache_size=0
    table_cache=256
    tmp_table_size=9M
    thread_cache_size=8
    myisam_max_sort_file_size=100G
    myisam_max_extra_sort_file_size=100G
    myisam_sort_buffer_size=18M
    key_buffer_size=11M
    read_buffer_size=64K
    read_rnd_buffer_size=256K
    sort_buffer_size=256K
    innodb_flush_log_at_trx_commit=1
    innodb_log_buffer_size=1M
    innodb_buffer_pool_size=18M
    innodb_log_file_size=10M
    innodb_thread_concurrency=8感觉很像mysql配置问题,但是不清楚如何配,网上找了很多资料但都没说清楚,都想换mssql了,
    在此跪拜~~
    拜托~~~~~~~~~~~~~~
      

  6.   

    sql语句有时写的不正确。调试过多。mysql_close()和mysql_free_result()该用的要用
      

  7.   

    http://lists.mysql.com/search.php?q=Forcing+++close+++of+++thread&list=&m=a&begin=-1貌似都没有一个很好地解决方法.
      

  8.   

    如果不是设置问题和sql语句问题 那我只有换mssql了~~~
      

  9.   

    至今没有好的办法解决,换了数据库 sql2000 用 adodb链接数据库 很稳定的!