前几天根据你的建议修改了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)

解决方案 »

  1.   

    在32位GNU/Linux x86上,你必须要小心不要设置过高的内存用量。glibc可能允许进程堆积在线程堆栈上发展,它会造成你的服务器崩溃。如果下列表达式的值接近或者超过2GB,系统会面临危机:innodb_buffer_pool_size+ key_buffer_size+ max_connections*(sort_buffer_size+read_buffer_size+binlog_cache_size)+ max_connections*2MB
      

  2.   

    应该是配置过大,还要调整,
    如:
    配置文件把各种设置调得较大,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
      

  3.   

    2003server+IIS6.0+PHP+MYSQL下 
    针对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
      

  4.   

    max_connections=1024 估计你撑不到500个链接就挂了
      

  5.   


    innodb_flush_log_at_trx_commit=0
    max_connections=3072这样行吗?
    如果不行,麻烦你给修改下吧,谢谢了
      

  6.   

    试试:
    max_open_files= 2048  
    max_connections= 1024  
    max_connections=1024
    table_cache=500
      

  7.   


    里面好像没有max_open_files,难道是在max_connections前面添加一个max_open_files=2048?
      

  8.   

    IIS进程回收设置是按照这里介绍的设置的,应该没有问题
    http://www.xinnethz.net/thread-1749-1-2.html
      

  9.   


    刚才试过了,在max_connections前面添加一个max_open_files=2048后
    MYSQL启动不起来,1067错误。
      

  10.   

    向各位报告:
    现在是下边的设置,速度明显快了很多。有没有其他问题,还需要观察/
    [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