前几天根据你的建议修改了my.ini
参考http://topic.csdn.net/u/20090325/14/7da90976-09f0-43c1-9873-fb6c81f30980.html
现在日志出现这样的提示频率很高,怎么解决?
D:\mysql\bin\mysqld-nt: Out of memory (Needed 1676220 bytes)
参考http://topic.csdn.net/u/20090325/14/7da90976-09f0-43c1-9873-fb6c81f30980.html
现在日志出现这样的提示频率很高,怎么解决?
D:\mysql\bin\mysqld-nt: Out of memory (Needed 1676220 bytes)
如:
配置文件把各种设置调得较大,mysql向系统要内存,却得不到。实际上:| join_buffer_size | 131072 |
| key_buffer_size | 536870912 |
| net_buffer_length | 1048576 |
| read_buffer_size | 1044480 |
| read_rnd_buffer_size | 262144 |
| sort_buffer_size | 2097144 | tmp_table_size | 67108864 |当前连接线程有120个,则占用内存最多为:120*(1M+2M+12K+24K)+512M+64M=940M服务器内存=4GB
针对4G内存
主要使用MyISAM
连接数量较多的mysql服务器(PHP+MYSQL文本链,只有文字没有图片)
修改成这样配置可以吗?[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
port=3306
default-character-set=utf8
default-storage-engine=MYISAM
max_connections=1024
query_cache_size=64M
table_cache=2048
tmp_table_size=256M
thread_cache_size=128
myisam_max_sort_file_size=1G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=300M
key_buffer_size=256M
read_buffer_size=8M
read_rnd_buffer_size=32M
sort_buffer_size=64M
skip-innodb
innodb_additional_mem_pool_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=4M
innodb_buffer_pool_size=8M
innodb_log_file_size=10M
innodb_thread_concurrency=8
innodb_flush_log_at_trx_commit=0
max_connections=3072这样行吗?
如果不行,麻烦你给修改下吧,谢谢了
max_open_files= 2048
max_connections= 1024
max_connections=1024
table_cache=500
里面好像没有max_open_files,难道是在max_connections前面添加一个max_open_files=2048?
http://www.xinnethz.net/thread-1749-1-2.html
刚才试过了,在max_connections前面添加一个max_open_files=2048后
MYSQL启动不起来,1067错误。
现在是下边的设置,速度明显快了很多。有没有其他问题,还需要观察/
[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
port=3306
default-character-set=utf8
default-storage-engine=MYISAM
max_connections=3072
query_cache_size=64M
table_cache=2048
tmp_table_size=256M
thread_cache_size=128
myisam_max_sort_file_size=1G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=300M
key_buffer_size=256M
read_buffer_size=8M
read_rnd_buffer_size=32M
sort_buffer_size=64M
skip-innodb
innodb_additional_mem_pool_size=8M
innodb_flush_log_at_trx_commit=0
innodb_log_buffer_size=4M
innodb_buffer_pool_size=8M
innodb_log_file_size=10M
innodb_thread_concurrency=8