国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

mysql Out of memory (Needed 16777224 bytes)的錯誤解決

2024-07-24 12:49:12
字體:
來源:轉載
供稿:網友
這幾天碰到這個錯誤。
至于我改的這幾個值是不是正確的解決方法,目前還不知道。先貼出來。
如果過一段時間我還是沒有更新,那以后同志們都參考吧 。
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 = '';
不知道這個是不是根本原因。我會再次更新的。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 常山县| 惠东县| 泽州县| 尼勒克县| 马龙县| 安阳县| 郧西县| 库尔勒市| 惠州市| 东兰县| 廊坊市| 扎赉特旗| 香格里拉县| 渝北区| 东乡| 东台市| 绿春县| 游戏| 揭阳市| 华宁县| 乃东县| 鄄城县| 崇明县| 华安县| 云霄县| 台东市| 突泉县| 乐东| 鹤庆县| 高邮市| 察隅县| 唐山市| 石嘴山市| 炉霍县| 台安县| 娄底市| 文登市| 塔河县| 盐山县| 德格县| 汉沽区|