mysql错误/usr/libexec/mysqld: Out of memory (Needed xxx bytes)
来源:互联网 发布:博彦科技面试题java 编辑:程序博客网 时间:2024/05/17 10:57
核心提示:检查mysqld配置my.conf,着重看key_buffer_size, max_heap_table_size, tmp_table_size几个参数,推荐设置key_buffer_size值为max_heap_table_size的1/4.
因为服务器内存而大富余比较多,前些天把my.conf里的好几个参数调得相当大,1G甚至2G,但并不稳定,mysqld报出过几次Out of memory (Needed xxx bytes)这样的错误,分析原因时,想到是32位linux系统上的linux不支持PAE,不能使用超过3G以上的内存,所以把改大的几个参数适当改小了点,最大也只有几百M的样子,但还是出现过几次Out of memory错误。于是网上多方查询,后来受到公式
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections
的启发,两次检查了key_buffer_size, max_heap_table_size, tmp_table_size几个参数,发现这三个值的设置是一样的,竟然都是512M!
于是改小key_buffer_size到128M,重启mysqld接下来5个小时的监测,没有再发生类似错误。
改了这几个参数后,还是有一条是Out of memory ,继续检查,发现innodb_buffer_pool_size = 1512M,于是我改为1000M,再启Mysql居然好了。
注:这台服务器一共了才3G内存:最终大至如下
key_buffer = 200Mkey_buffer_size = 1294963200
#max_join_size = 4294967295
max_join_size = 1294967295
max_allowed_packet = 1M
#table_open_cache = 512
table_cache = 512
sort_buffer_size = 2294967295
read_buffer_size = 2147479552
#write_buffer_size = 4294967295
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
0 0
- mysql错误/usr/libexec/mysqld: Out of memory (Needed xxx bytes)
- Out of memory (Needed 6707872 bytes)
- mysql内存超出 mysqld: Out of memory 解决办法
- Caused by: java.sql.SQLException: Out of memory; restart server and try again (needed 142328 bytes)
- Qt编译错误之out of memory allocating 1073745919 bytes
- /usr/libexec/mysqld: Can't change dir to '/xxx' (Errcode: 13) 解决
- mysql 启动报错 /usr/local/mysql//libexec/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid'
- Allowed memory size of xxx bytes
- 130623 3:34:16 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
- /usr/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
- cc1plus.exe: out of memory allocating 3355443200 bytes的一种错误情况
- mysql出现out of memory错误的解决方法
- usr/libexec/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid
- 解决PHP之 Allowed memory size of xxx bytes exhausted
- 解决PHP之 Allowed memory size of xxx bytes exhausted
- 解决PHP之 Allowed memory size of xxx bytes exhausted
- Qt编译出错问题:out of memory allocating 1073745919 bytes
- cc1plus.exe: out of memory allocating 3355443200 bytes
- php 通过 SoapClient 获取天气情况
- windows系统下c++扩展PHP开发流程
- 找零 递归 打印所有结果
- 链表
- java对Execl的导入导出
- mysql错误/usr/libexec/mysqld: Out of memory (Needed xxx bytes)
- Ext.form.FieldSet的常用配置项
- 1006. 换个格式输出整数
- github first use
- Android学习笔记之Fragment的两种使用方法
- 想的多一点,想得少一点和想的大一点和,想的小一点
- MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to r
- 今日Oracle及Hibernate问题总结
- 课程设计 银行账号管理