MySQL 5.6因为OOM导致数据库重启
发表于:2024-10-18 作者:千家信息网编辑
千家信息网最后更新 2024年10月18日,线上的一套MySQL 5.6的从库,因为OOM而导致数据库重启。# tail -50 /var/log/messagesNov 13 16:00:40 app-push-db2 kernel: Out
千家信息网最后更新 2024年10月18日MySQL 5.6因为OOM导致数据库重启
线上的一套MySQL 5.6的从库,因为OOM而导致数据库重启。
# tail -50 /var/log/messagesNov 13 16:00:40 app-push-db2 kernel: Out of memory: Kill process 26121 (mysqld) score 957 or sacrifice childNov 13 16:00:40 app-push-db2 kernel: Killed process 26121 (mysqld) total-vm:18804176kB, anon-rss:15541596kB, file-rss:0kB, shmem-rss:0kB
报错原因:
这台实例所在的服务器上面部署了单实例MySQL,物理内存为16G,分配给数据库的缓存innodb_fuffer_pool_size为12G。
# free -g total used free shared buff/cache availableMem: 15 10 0 0 5 4Swap: 0 0 0
为了提高性能,这台实例关闭了磁盘的swap交换。
# cat /etc/rc.local#!/bin/bash# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES## It is highly advisable to create own systemd services or udev rules# to run scripts during boot instead of using this file.## In contrast to previous versions due to parallel execution during boot# this script will NOT be run after all other services.## Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure# that this script will be executed during boot.touch /var/lock/subsys/localswapoff -a
当客户端连接多的时候,导致内存资源耗尽。
解决方法:
将innodb_buffer_pool_size调整为10G,预留出一些内存给操作系统和客户端连接。
重启数据库,使参数生效。
# grep innodb_buffer_pool /etc/my.cnfinnodb_buffer_pool_size=10G
数据
数据库
内存
实例
客户
客户端
操作系统
原因
参数
性能
所在
方法
时候
服务器
物理
磁盘
系统
缓存
资源
分配
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库 安全设计
洛奇英雄传国服数据库
清华大学软件开发和研究中心
搜索引擎用什么数据库
谷歌新加坡服务器
购买网络安全监测请示
用于数据库恢复的基本技术
网络安全知识讲座简报
生物学数据库哪些比较好
以下哪项不是中国期刊全文数据库
网络安全面试模拟题
服务器可以同时远程登录吗
河北网络营销软件开发定制平台
按数字1出服务器管理办法
数据库 公司欺诈
软件开发 成都 图像处理
无锡多功能软件开发方法
禅城区网络安全大队
网络技术支撑单位表彰
兴田网络技术有限公司
动漫插图软件开发
依法落实网络安全保护措施
2017年青少年网络安全
网工软考网络技术
数据库仿真通信
万德数据库可以用吗
网络技术招商趋势
青浦区专业软件开发制品价格
华为杭州通用软件开发工程师
如果查看数据库表空间容量