mysql磁盘空间满了会崩吗_磁盘空间不够导致mysql崩溃重启

起因:

群里有人提了句pt-ioprofile,我不知道,就查了查,想测一测,想以后可能会有帮助。

为了能看到效果,我选择了我虚拟机上最大的压测表Sbtest1,该表有100w数据,执行update sbtest1 set k=k+1;

并且通过pt-ioprofile查看到了想要的结果,然后就干别的去了,下午了,看update sbtest1 set k=k+1;这个窗口的光标还闪着,以为还没执行完,不停地回车,crtl c,各种不好用。过了一会儿,报错了,并且提示mysql已经重启了。

我去他嘞

报错信息为:Binary logging not possible. Message: An error occurred during flush stage of the commit.‘binlog_error_action‘ is set to ‘ABORT_SERVER‘. Hence aborting the server.

给出这个,我也看不明白

查看错误日志:

2018-11-01T11:25:54.493321+08:00 895 [Note] Access denied for user ‘root‘@‘localhost‘ (using password: NO)

2018-11-01T11:29:17.566331+08:00 896 [ERROR] Disk is full writing ‘/data/mysql/mysql-bin.000025‘ (Errcode: 16026912 - No space left on device). Waiting for someone to free space...

2018-11-01T11:29:17.566355+08:00 896 [ERROR] Retry in 60 secs. Message reprinted in 600 secs

2018-11-01T11:30:17.567664+08:00 896 [ERROR] Disk is full writing ‘/data/mysql/mysql-bin.000025‘ (Errcode: 16026912 - No space left on device). Waiting for someone to free space...

2018-11-01T11:30:17.567705+08:00 896 [ERROR] Retry in 60 secs. Message reprinted in 600 secs

2018-11-01T11:40:17.641906+08:00 896 [ERROR] Disk is full writing ‘/data/mysql/mysql-bin.000025‘ (Errcode: 16026912 - No space left on device). Waiting for someone to free space...

2018-11-01T11:40:17.642048+08:00 896 [ERROR] Retry in 60 secs. Message reprinted in 600 secs

2018-11-01T11:40:17.707079+08:00 896 [ERROR] Disk is full writing for someone to free space...

2018-11-01T11:40:17.642048+08:00 896 [ERROR] Retry in 60 secs. Message reprinted in 600 secs

2018-11-01T11:50:19.000088+08:00 896 [ERROR] /usr/local/mysql/bin/mysqld: Binary logging not possible. Message: An error occurred during flush stage of the commit. ‘binlog_error_action‘ is set to ‘ABORT_SERVER‘. Hence aborting the server.

06:08:19 UTC - mysqld got signal 6 ;

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=134217728

read_buffer_size=524288

max_used_connections=3

max_threads=10000

thread_count=1

connection_count=1

It is possible that mysqld could use up to

key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 15624665 K bytes of memory

Hope that‘s ok; if not, decrease some variables in the equation.

Thread pointer: 0x5aa4a70

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...

stack_bottom = 7fa568c81e58 thread_stack 0x40000

/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x35)[0xf4a495]

/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x4a4)[0x7ce2f4]

/lib64/libpthread.so.0[0x3c9bc0f670]

/lib64/libc.so.6(gsignal+0x3e)[0x3c9b4322fe]

/lib64/libc.so.6(abort+0x175)[0x3c9b433745]

/usr/local/mysql/bin/mysqld[0xee249a]

/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG33handle_binlog_flush_or_sync_errorEP3THDb+0x163)[0xef0bd3]

/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG14ordered_commitEP3THDbb+0x3ca)[0xef106a]

/usr/local/mysql/bin/mysqld(_ZN13MYSQL_BIN_LOG6commitEP3THDb+0x585)[0xef1825]

/usr/local/mysql/bin/mysqld(_Z15ha_commit_transP3THDbb+0x174)[0x81f594]

/usr/local/mysql/bin/mysqld(_Z17trans_commit_stmtP3THD+0x32)[0xdd1272]

/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THDb+0x707)[0xd161f7]

/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x40d)[0xd1af7d]

/usr/local/mysql/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x119a)[0xd1c19a]

/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0x194)[0xd1d044]

/usr/local/mysql/bin/mysqld(handle_connection+0x29c)[0xded7ac]

/usr/local/mysql/bin/mysqld(pfs_spawn_thread+0x174)[0xf707b4]

/lib64/libpthread.so.0[0x3c9bc06cea]

/lib64/libc.so.6(clone+0x6d)[0x3c9b4d7fad]

Trying to get some variables.

Some pointers may be invalid and cause the dump to abort.

Query (5b066e0): update sbtest1 set k=k+1

Connection ID (thread ID): 896

Status: KILL_QUERY

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains

information that should help you find out what is causing the crash.

2018-11-01T14:08:19.463179+08:00 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2018-11-01T14:08:19.463280+08:00 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.21-log) starting as process 54682 ...

就现象看,即使磁盘空间满了,mysql不会立刻宕机,而是每一分钟做一次检查,在600秒内将错误信息记录到错误日志。直到我瞎按,触发了重启。

由于不知所措,期间并没有执行show full processlist查看,一切都是后知后觉

重新测试一下:

空间写满

6f8c7cc658a5a103eaab2da00fd8e4b4.png

错误日志开始循环打印信息

9da4c1dcb45587f8b6835772e53431ff.png

State query end

693e9327c4fafb76dc7fdbc78df9183f.png

日志不记录了,手动ctrl c

fe60efa01b421527e4a65df752a60fbe.png

75f7b332ed6712a9ac267679d49cf789.png

日志开始kill query

715531b92724e8462f293fbff66e4d91.png

Mysql重启

143654cbfb5adc4bb5db97b68df3ae15.png

空间还原

675a84ae5201d128fdabf7b8a36a6b4b.png

Binlog之前记录的也被清理了,重启后生成个新的27

前:

81ed4fef293f1536024729ecaad1e8de.png

后:

933b9092489017ea954479967b5c6fc5.png

如果手动kill query是不是不会导致restart?

b79eabfca64527ca5170f1e752a41337.png

执行kill操作依然触发了重启

a6360015ce081abb42ca83478838e8d9.png

结论:

所以还是要实时监控空间大小啊。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
【优质项目推荐】 1、项目代码均经过严格本地测试,运行OK,确保功能稳定后才上传平台。可放心下载并立即投入使用,若遇到任何使用问题,随时欢迎私信反馈与沟通,博主第一时间回复。 2、项目适用于计算机相关专业(如计科、信息安全、数据科学、人工智能、通信、物联网、自动化、电子信息等)的在校学生、专业教师,或企业员工,小白入门等都适用。 3、该项目不仅具有很高的学习借鉴价值,对于初学者来说,也是入门进阶的绝佳选择;当然也可以直接用于 毕设、课设、期末大作业或项目初期立项演示等。 3、开放创新:如果您有一定基础,且热爱探索钻研,可以在此代码基础上二次开发,进行修改、扩展,创造出属于自己的独特应用。 欢迎下载使用优质资源!欢迎借鉴使用,并欢迎学习交流,共同探索编程的无穷魅力! 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值