至于我改的这几个值是不是正确的解决方法,目前还不知道。先贴出来
这几天碰到这个错误。至于我改的这几个值是不是正确的解决方法,目前还不知道。先贴出来。
如果过一段时间我还是没有更新,那以后同志们都参考吧 。
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 |
+---------------------------------+----------------------+
顺便看一下这篇文章中的一段话:
http://dev.mysql.com/tech-resources/articles/mysql-query-cache.html
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.
补充:
今天在手册上看到这段话
http://dev.mysql.com/doc/refman/5.1/en/out-of-memory.html
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官方解决了。
http://bugs.mysql.com/bug.php?id=31898

The first LPCAMM2 modules for laptops are already being delivered, and desktop mainboards are also expected to be equipped with CAMM2 in future. CAMM2 and LPCAMM2 are not compatible with each other, and even on desktop PCs, customers need to be caref

win10系统是一款非常值得使用的优秀系统,强大的兼容性和高智能可以确保win10系统在使用中基本不会出现什么问题,但近日却有很多小伙伴们反应自己的电脑出现了频繁蓝盘并且老是提示错误代码memorymanagement这是怎么回事呢?今天小编就为大家带来了win10频繁蓝屏并且出现了memorymanagement终止代码的解决办法游戏需要的话就快来看看吧。win10memorymanagement蓝屏的解决办法:解决方法一:1、使用“Win键+R”+输入“control+enter”进入控制面

MySQL储存引擎选型对比:InnoDB、MyISAM与Memory性能指标评估引言:在MySQL数据库中,储存引擎的选择对于系统性能和数据完整性起着至关重要的作用。MySQL提供了多种储存引擎,其中最常用的引擎包括InnoDB、MyISAM和Memory。本文将就这三种储存引擎进行性能指标评估,并通过代码示例进行比较。一、InnoDB引擎InnoDB是My

PHP是一种广泛使用的服务器端脚本语言,但是在运行PHP应用程序时,可能会遇到‘PHPFatalerror:Allowedmemorysizeofbytesexhausted’的错误信息,这通常意味着内存分配问题。在本文中,我们将探讨一些常见的导致‘PHPFatalerror:Allowedmemorysizeofbytese

1、Memory表的每个表可以有多达32个索引。每个索引16列,以及500字节的键长度。2、存储引擎执行HASH和BTREE缩影。3、表中可以有非唯一的键值。4、表采用固定的记录长度格式。5、不支持BLOB或TEXT列。实例mysql>CREATETABLElookup(idINT,INDEXUSINGHASH(id))ENGINE=MEMORY;mysql>CREATETABLElookup(idINT,INDEXUSINGBTREE(id))ENGINE=MEMORY;

South Korean memory maker SK hynix Inc. has announced its latest graphics memory, GDDR7, which claims to be industry-leading. This news comes almost two weeks after Samsung announced the industry's first GDDR7 DRAM solution on July 19th with 1.5 TBps

Samsung Electronics has successfully passed Nvidia's rigorous testing for its 8-layer HBM3E memory chips, positioning itself as a key supplier for the rapidly growing AI chip industry. HBM, or High Bandwidth Memory, is a specialized type of DRAM desi

The Raspberry Pi 5 is a very versatile single-board computer, mainly because of its extensive connectivity, and the significantly increased computing capacity compared to previous generations also plays a role. In the field of IT, it is not unusual f


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 English version
Recommended: Win version, supports code prompts!
