最近服务器日志上老出现错误提示,改了几次配置还是有,请各位有经验的朋友指点一下。Changed limits: max_open_files: 2048  max_connections: 1024  table_cache: 507For more information, see Help and Support Center at http://www.mysql.com.  
内存是4G
引擎是INNODB
操作中select居多,update略次
网站与数据库同一机器,流量约2万IP左右,并发没统计过,请指点,下面的配置要更改那些?当前配置:# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=gbk# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"max_connections=1024query_cache_size=128Mtable_cache=768tmp_table_size=256Mthread_cache_size=38#*** MyISAM Specific optionsmyisam_max_sort_file_size=100Gmyisam_max_extra_sort_file_size=100Gmyisam_sort_buffer_size=30Mkey_buffer_size=256Mread_buffer_size=1024K
read_rnd_buffer_size=2Msort_buffer_size=512K#*** INNODB Specific options ***innodb_additional_mem_pool_size=6Minnodb_flush_log_at_trx_commit=2innodb_log_buffer_size=8Minnodb_buffer_pool_size=512Minnodb_log_file_size=50Minnodb_thread_concurrency=18

解决方案 »

  1.   

    把你的 table_cache 调小一些。你的内存估计无法支持这么多。
      

  2.   

    max_connections=1024query_cache_size=128Mtable_cache=768
    -------------------------->>
    max_connections=1024query_cache_size=128Mtable_cache=500 估计你这是由于max_connections 、max_open_files、table_cache 相关值不匹配造成的。
      

  3.   

    key_buffer_size = 384M
    max_allowed_packet = 1M
    table_open_cache = 512
    sort_buffer_size = 2M
    read_buffer_size = 2M
    read_rnd_buffer_size = 8M
    myisam_sort_buffer_size = 64M
    thread_cache_size = 8
    query_cache_size = 32M
    thread_concurrency = 85.1.36版本和你不一样,大同小异
      

  4.   

    table_cache调为多少,这几个有没有一个比例可参考的?5楼的,5.1.36版没有这个值的吗?