MySQL在启动时崩溃 [英] MySQL crash on startup

查看:2005
本文介绍了MySQL在启动时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用wamp笔记本电脑进行开发,而mysql从几周开始运行良好.今天在启动mysql崩溃60秒后,我在日志中发现以下错误:

I'm developing on my laptop with wamp and mysql is running fine from weeks. Today after 60 seconds after boot mysql crashes I and find the following error inside the log:

2016-03-17T20:34:37.662021Z 0 [ERROR] InnoDB: Cannot allocate 4294956804 bytes of memory after 60 retries over 60 seconds. OS error: Not enough space (12). Check if you should increase the swap file or ulimits of your operating system. Note that on most 32-bit computers the process memory space is limited to 2 GB or 4 GB.
2016-03-17 21:34:37 0x2b74  InnoDB: Assertion failure in thread 11124 in file ut0ut.cc line 938
InnoDB: Failing assertion: !m_fatal
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.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
20:34:37 UTC - mysqld got exception 0x80000003 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=67108864
read_buffer_size=2097152
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 685380 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x103288c0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
2016-03-17T20:34:37.682021Z 0 [ERROR] InnoDB: Cannot allocate 4294954524 bytes of memory after 60 retries over 60 seconds. OS error: Not enough space (12). Check if you should increase the swap file or ulimits of your operating system. Note that on most 32-bit computers the process memory space is limited to 2 GB or 4 GB.
2016-03-17 21:34:37 0x2b58  InnoDB: Assertion failure in thread 11096 in file ut0ut.cc line 938
InnoDB: Failing assertion: !m_fatal
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.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.

在我看来,似乎存在内存问题:

To me it seems that there is a memory issue:

[错误] InnoDB:60后无法分配4294956804字节的内存 重试超过60秒.操作系统错误:空间不足(12).

[ERROR] InnoDB: Cannot allocate 4294956804 bytes of memory after 60 retries over 60 seconds. OS error: Not enough space (12).

崩溃可能是由于此错误引起的吗? mysql尝试分配4Gb的ram是很奇怪的,通常它使用或多或少的500Mb.

Could it be that the crash is due to this error? It's weird that mysql try to allocate 4Gb of ram, normally it uses more or less 500Mb.

这是my.ini:

innodb_buffer_pool_size = 16M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

我在win7 64位上运行mysql 32位.

I'm running mysql 32 bit on a win7 64bit.

这是我可以解决的一些变量更改问题吗?

Is this something I can solve changing some variable?

非常感谢您的帮助

推荐答案

可能是InnoDB数据损坏.我添加了

It was probably a corruption of the InnoDB data. I added

innodb_force_recovery = 2

到my.ini,重新启动数据库,我能够转储所有数据并恢复它们.

to my.ini, restarted the DB and I was able to dump all the data and recover it.

请注意使用它,请先阅读文档: http://dev.mysql.com/doc/refman/5.7/zh-CN/forcing-innodb-recovery.html

Be aware of using this, read the documentation before: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html

这篇关于MySQL在启动时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆