我们的网站有时出现这样的错误,高手们看下怎么回事?
Can't connect to MySQL server on 'localhost' (10061)
介绍一下情况:
操作系统 windows2003;
网站日访问量不到10万;
一般在线人数在100以内;
my.ini中back_log设置1000;
Can't connect to MySQL server on 'localhost' (10061)
介绍一下情况:
操作系统 windows2003;
网站日访问量不到10万;
一般在线人数在100以内;
my.ini中back_log设置1000;
091224 10:19:50 [ERROR] E:\php\MySQL5\bin\mysqld-nt: Out of memory (Needed 141863980 bytes)
091224 10:19:50 [ERROR] E:\php\MySQL5\bin\mysqld-nt: Sort aborted
091224 10:19:50 [ERROR] E:\php\MySQL5\bin\mysqld-nt: Sort aborted从信息上看,你的内存不足了,看一下是什么SQL语句导致这么大的内存占用,你首先检查一下slow-query log
还有我们的内存是8G,并且语句前几天才优化过一次,慢语句的确有,可是优化起来已经比较困难了,问还有其它更好的方法吗?
default-storage-engine=INNODB
max_connections=5000
query_cache_size=16M
table_cache=1000
tmp_table_size=300M
join_buffer_size=8M
query_cache_limit=1M
max_length_for_sort_data=64M
thread_cache_size=128
myisam_max_sort_file_size=100G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=256M
key_buffer_size=1000M
read_rnd_buffer_size=256M
sort_buffer_size=600M
innodb_additional_mem_pool_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=8M
innodb_buffer_pool_size=250M
innodb_log_file_size=50M
innodb_thread_concurrency=18
concurrent_insert=2
key_buffer_size=1000M
sort_buffer_size=600M 调整为:
key_buffer_size=600M
sort_buffer_size=300M 试试
Key_writes 258 k
这正常吗?