Out of memory (Needed 16777224 bytes) error resolution

These days encounter this error.
As I changed these values is not the right solution, it is not known. First posted.
If once in a while I still have not updated it after comrades have reference to it. 05235901_wu06.gif
Out of memory (Needed 16777224 bytes) error resolution
look at the manual:
[url] http://dev.mysql.com/doc/refman/5.1/en/memory-storage-engine.html [/ url]
began to change me the value of query_cache_size.
It seems no good.
After
increasing the value of query_cache_limit.
There max_heap_table_size
value of tmp_table_size.
Because we are using a lot of stored procedures prepared statement. And the results of the statement is very large.
At first my results:
MySQL> Show the 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 'the tmp_table_size';
+ ------------------- + ---------------------- + --------------
| variable_name | Value |
+ ------ --------------------------- + ---------------------- +
| tmp_table_size | 67108864 |
+ --------------------------------- + --------- ------------- +

by the way look at this article in the passage:
[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 have been inserted The 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 the RAM Devoted to Individual Query Cache entry the each. Large sets the Result Query Settings by Will the require larger of the this variable.

Added:
today saw this passage in the manual

[url] http://dev.mysql.com/doc/refman/5.1/en/ memory.html-of-OUT [/ url]
the If you a using Query Issue A at the MySQL Client Program and receive AN error like following at the One, IT means that MySQL does not have have enough Memory to Store at the Entire Query the Result:

so I put my All stored procedures are modified.
Because it's prepared statement is not clear.
after testing.
For example:
which used
PREPARE S1 the FROM @STMT;
...
must
SET @STMT = '';
I do not know if this is not the root cause. I'll update again.
Once again proved that doing so will reduce this situation. But all afternoon the stored procedure changed.
Any ordinary connections are replaced by a LEFT JOIN. EXPLAIN established by the relevant index.
And replaced the version 5.0.45. As to whether or error. Following continued. . . Currently there are no errors.


This problem looks like MYSQL official resolved.
[url]http://bugs.mysql.com/bug.php?id=31898[/url]

This article comes from " God, let there or be square! " Blog, reproduced please contact the author!

Reproduced in: https: //my.oschina.net/u/585111/blog/219509

Guess you like

Origin blog.csdn.net/weixin_33885253/article/details/92008356