我在 Windows 2008 机器(3GB RAM)上安装了 MySQL 5.0。我的服务器经常崩溃(几乎每天一次)总是出现这个唯一的错误:
Changed limits: max_open_files: 2048 max_connections: 800 table_cache: 619
我没有使用沉重的 InnoDB .ini 文件,尽管我正在重新考虑我应该使用吗?我担心大的配置更改会使我当前的站点停止工作。我应该怎么办?
这是我当前的ini设置:
default-character-set=latin1
default-storage-engine=INNODB
max_connections=800
query_cache_size=84M
table_cache=1520
tmp_table_size=30M
thread_cache_size=38
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=30M
key_buffer_size=129M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=6M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=3M
innodb_buffer_pool_size=250M
innodb_log_file_size=50M
innodb_thread_concurrency=10
以下是来自 phpMyAdmin 的一些额外信息:
服务器:MYSERVER(通过 TCP/IP 的本地主机)
服务器版本:5.0.90-community-nt
协议版本:10
MySQL 字符集:UTF-8 Unicode (utf8)
Microsoft-IIS/7.0
MySQL 客户端版本:5.0.90
PHP 扩展:mysqli
根据我的研究,在我看来,这个错误表明操作系统硬编码限制不断受到影响,我应该使用 innoDB 重 .ini 文件。但是,我不知道这对我使用 MySQL 的网站会有什么影响。下面是我正在考虑替换它的繁重的 innoDB 配置,谁能告诉我这对我的现有数据库站点意味着什么?它们都是 InnoDB,甚至它们的所有表都是 InnoDB。我在正确的轨道上吗?
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
back_log = 50
max_connections = 100
max_connect_errors = 10
table_cache = 2048
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
thread_concurrency = 8
query_cache_size = 64M query_cache_limit
= 2M
ft_min_word_len = 4
default_table_type = MISAM
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 64M
log-bin=mysql-bin
log_slow_queries
long_query_time = 2
log_long_format
server-id = 1 key_buffer_size
= 32M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
skip-federated
skip- bdb
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 2G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
[mysqldump]
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[isamchk] key_buffer =
512M sort_buffer_size =
512M
read_buffer = 8M
write_buffer = 8M
[myisamchk] key_buffer =
512M sort_buffer_size
= 512M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
交互超时
[mysqld_safe]
打开文件限制 = 8192