萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> mysql教程 >> mysql報錯:Out of memory (Needed 76016 bytes)問題

mysql報錯:Out of memory (Needed 76016 bytes)問題

最近安裝了新的服務器問題非常的多了,今天又碰到mysql提示Out of memory錯誤了,下面我們來看mysql報錯:Out of memory (Needed 76016 bytes)問題解決辦法吧.

檢查mysqld配置my.conf

Out of memory (Needed 76016 bytes)問題

key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections

注:這台服務器一共了才3G內存:最終大至如下
 
key_buffer = 200M
 key_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

當然如果運行出現php問題我們可以對php.ini中的幾個參數進行操作

修改php.ini
 
如下的區域
 
max_execution_time = 120 ; Maximum execution time of each script, in seconds
 max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
 memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

重啟apache或iis即可

copyright © 萬盛學電腦網 all rights reserved