Mysql服务器经常出现故障

时间:2014-10-29 11:42:15

标签: mysql

下面给出的是我得到的mysql错误日志。我们的应用程序每秒只能获得10-20个请求,但每隔半小时我就会在mysql日志中收到此错误,并且mysql会自动停止。

2014-10-29 16:52:01 5114  InnoDB: Encountered a problem with file .\ib_logfile1
2014-10-29 16:52:01 5114  InnoDB: Disk is full. Try to clean the disk to free space.
2014-10-29 16:52:01 5114  InnoDB: Assertion failure in thread 20756 in file fil0fil.cc     line 5475
InnoDB: Failing assertion: ret
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
2014-10-29 16:52:17 44652 [ERROR] C:/Program Files (x86)/MySQL/MySQL Server     5.6/bin\mysqld: Sort aborted: Error writing file     'C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp\MY8E87.tmp' (Errcode: 28 - No space left on device)
2014-10-29 16:52:21 44652 [ERROR] C:/Program Files (x86)/MySQL/MySQL Server 5.6/bin\mysqld: Sort aborted: Error writing file  'C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp\MY8E86.tmp' (Errcode: 28 - No space left on device)

2 个答案:

答案 0 :(得分:1)

2014-10-29 16:52:01 5114 InnoDB: Disk is full. Try to clean the disk to free space.

明显的记忆问题。增加系统内存

答案 1 :(得分:1)

错误消息告诉您出现了什么错误:

Disk is full. Try to clean the disk to free space.

在错误日志的底部附近会显示以下行:

 5.6/bin\mysqld: Sort aborted: Error writing file 'C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp\MY8E87.tmp' 
     (Errcode: 28 - No space left on device)

对我而言,您似乎正在尝试进行排序操作(可能是为了在查询中实现ORDER BY子句)并且您正在耗尽硬盘上的临时空间。看起来MySQL正在使用服务器上NETWORK用户的用户临时目录。

您可以查看该目录C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp\以查看是否存在大量旧垃圾临时文件,并将其删除。

我怀疑在坠机事件发生后很难找到; MySQL在崩溃时释放临时空间。

您可以告诉MySQL使用不同的磁盘作为其临时空间。有关信息,请参阅此http://dev.mysql.com/doc/refman/5.6/en/temporary-files.html

还有另一种可能性

您在发布的错误日志中说明了......也许您的表已损坏,您可以将其清除。

InnoDB: there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html