当前位置: 首页 > news >正文

Out of memory (Needed 16777224 bytes)的错误解决

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

这几天碰到这个错误。
至于我改的这几个值是不是正确的解决方法,目前还不知道。先贴出来。
如果过一段时间我还是没有更新,那以后同志们都参考吧 。05235901_wu06.gif
Out of memory (Needed 16777224 bytes)的错误解决
看看手册:
[url]http://dev.mysql.com/doc/refman/5.1/en/memory-storage-engine.html[/url]
开始我更改了query_cache_size的值。
好像也不行。
之后
增大query_cache_limit 的值。
还有max_heap_table_size
和tmp_table_size的值。
因为我们的存储过程中用了好多的预处理语句。而且语句的结果都是非常大的。
起初我的结果:
mysql> show variables like 'max_heap_table_size';
+---------------------------------+----------------------+
| Variable_name                   | Value                |
+---------------------------------+----------------------+
| max_heap_table_size             | 16777216             |
+---------------------------------+----------------------+

mysql> show variables like 'tmp_table_size';
+---------------------------------+----------------------+
| Variable_name                   | Value                |
+---------------------------------+----------------------+
| tmp_table_size                  | 16777216             |
+---------------------------------+----------------------+

我改了my.cnf文件

mysql> show variables like 'max_heap_table_size';
+---------------------------------+----------------------+
| Variable_name                   | Value                |
+---------------------------------+----------------------+
| max_heap_table_size             | 67108864             |
+---------------------------------+----------------------+

mysql> show variables like 'tmp_table_size';
+---------------------------------+----------------------+
| Variable_name                   | Value                |
+---------------------------------+----------------------+
| tmp_table_size                  | 67108864             |
+---------------------------------+----------------------+

顺便看一下这篇文章中的一段话:
[url]http://dev.mysql.com/tech-resources/articles/mysql-query-cache.html[/url]

Qcache_hits and Qcache_inserts shows the number of times a query was serviced from the cache and how many queries have been inserted into the cache. Low ratios of hits to inserts indicate little query reuse or a too-low setting of the query_cache_limit , which serves to govern the RAM devoted to each individual query cache entry. Large query result sets will require larger settings of this variable.

补充:
今天在手册上看到这段话

[url]http://dev.mysql.com/doc/refman/5.1/en/out-of-memory.html[/url]
If you issue a query using the mysql client program and receive an error like the following one, it means that mysql does not have enough memory to store the entire query result:

所以我把我的所有存储过程都修改了。
因为里面的预处理语句没有清零。
经过测试。
比如:
里面用到
PREPARE S1 FROM @STMT;
...
一定要
SET @STMT = '';
不知道这个是不是根本原因。我会再次更新的。
再次证明这样做会减少这种情况。不过下午把所有存储过程修改了。
凡是普通连接的都改为LEFT JOIN 了。通过EXPLAIN建立了相关索引。
而且把版本换成了5.0.45。至于是否还是出现错误。还在继续关注中。。。目前没有任何错误。


这个问题貌似MYSQL官方解决了。
[url]http://bugs.mysql.com/bug.php?id=31898[/url]

本文出自 “上帝,咱们不见不散!” 博客,转载请与作者联系!

转载于:https://my.oschina.net/u/585111/blog/219509

相关文章:

  • Servlet、Filter、Listener总结
  • 《The One!团队》第八次作业:ALPHA冲刺(二)
  • HttpClient 4.3.3 cookie rejected的解决办法
  • 大象也能起舞,Citrix X1计划让你对笔记本电脑say good bye
  • VOA 2009/11/02 DEVELOPMENT REPORT - In Kenya, a Better Life Through Mobile Money
  • 安装 chkrootkit报错:/usr/bin/ld: cannot find -lc
  • 大型网站技术架构(八)网站的安全架构
  • 32位程序在64位系统上获取系统安装时间
  • 怎样 配置这个网络拓扑
  • 关于烂代码的那些事(中)
  • Spring学习总结(4)——Spring AOP教程
  • CentOS 7安装配置Apache HTTP Server
  • 《团队名称》第八次团队作业:Alpha冲刺
  • Velocity常用方法
  • 《Play for Java》学习笔记(三)template+Message
  • 「译」Node.js Streams 基础
  • 【附node操作实例】redis简明入门系列—字符串类型
  • 2017-09-12 前端日报
  • 2018以太坊智能合约编程语言solidity的最佳IDEs
  • egg(89)--egg之redis的发布和订阅
  • ES6--对象的扩展
  • JavaScript的使用你知道几种?(上)
  • Js基础——数据类型之Null和Undefined
  • Mac转Windows的拯救指南
  • node入门
  • Python爬虫--- 1.3 BS4库的解析器
  • Python学习之路13-记分
  • React-redux的原理以及使用
  • supervisor 永不挂掉的进程 安装以及使用
  • Three.js 再探 - 写一个跳一跳极简版游戏
  • 高程读书笔记 第六章 面向对象程序设计
  • 官方解决所有 npm 全局安装权限问题
  • 开发基于以太坊智能合约的DApp
  • 漫谈开发设计中的一些“原则”及“设计哲学”
  • 批量截取pdf文件
  • 深度学习在携程攻略社区的应用
  • 深入体验bash on windows,在windows上搭建原生的linux开发环境,酷!
  • #鸿蒙生态创新中心#揭幕仪式在深圳湾科技生态园举行
  • (二)基于wpr_simulation 的Ros机器人运动控制,gazebo仿真
  • (二)七种元启发算法(DBO、LO、SWO、COA、LSO、KOA、GRO)求解无人机路径规划MATLAB
  • (附源码)spring boot基于Java的电影院售票与管理系统毕业设计 011449
  • (附源码)ssm本科教学合格评估管理系统 毕业设计 180916
  • (剑指Offer)面试题34:丑数
  • (强烈推荐)移动端音视频从零到上手(上)
  • (亲测成功)在centos7.5上安装kvm,通过VNC远程连接并创建多台ubuntu虚拟机(ubuntu server版本)...
  • (一)Linux+Windows下安装ffmpeg
  • (转)linux下的时间函数使用
  • (转)shell中括号的特殊用法 linux if多条件判断
  • (轉貼) 蒼井そら挑戰筋肉擂台 (Misc)
  • .NET Core 和 .NET Framework 中的 MEF2
  • @angular/cli项目构建--http(2)
  • @我的前任是个极品 微博分析
  • [2019.3.5]BZOJ1934 [Shoi2007]Vote 善意的投票
  • [C#]扩展方法
  • [C#]使用PaddleInference图片旋转四种角度检测