最近服务器日志上老出现错误提示,改了几次配置还是有,请各位有经验的朋友指点一下。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
-------------------------->>
max_connections=1024query_cache_size=128Mtable_cache=500 估计你这是由于max_connections 、max_open_files、table_cache 相关值不匹配造成的。
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版本和你不一样,大同小异