我的服务器只跑论坛,只能支持到1100人15分钟,郁闷的很啊,一超就挂,只有重启机器。
拜托各位大姥了,把你们比较牛 的配置文件发上来参考一下吧
我的服务器配置是:
服务器配置:P4 3.0 Ghz w/ HT 2048 MB 160 GB SATA
操作系统: centos 2.0
apache 2.0 php 4.41 mysql 4.026
论坛15分钟在线人数一旦达到1100,服务器就会down掉,进入就显示
QUOTE:
Discuz! info: Can not connect to MySQL server
Time: 2006-1-29 10:29pm
Script: /bbs/index.php
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (11)
或者显示服务器连接数太多,接着论坛就挂了,什么都打不开。
我的my.cnf配置文件如下:
QUOTE:
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-innodb
skip-locking
skip-bdb
skip-name-resolv
key_buffer=384M
max_allowed_packet=4M
max_connections=512
interactive_timeout=10
myisam_sort_buffer_size=64M
max_connect_errors=10
table_cache = 512
sort_buffer_size=12M
net_buffer_length = 2M
thread_concurrency=2
wait_timeout=30
back_log=500
connect_timeout=15
join_buffer_size=12M
read_buffer_size=12M
read_rnd_buffer_size=12M
thread_cache_size=100
query_cache_size=32M
query_cache_limit=8M
query_cache_type=1
long_query_time= 1
tmp_table_size= 64M
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
max_connections=512这个设置大点
cpu有多高,设置成1024看看,其它值也设置下
|
你的配置挂一个论坛,应该没问题,把 max_connections=512----》max_connections=1024 max_connect_errors=10---》max_connect_errors=100或更大点 |
不行哦,设置大了论坛就自动掉了,郁闷的很啊。
还有,刚才检查了一下 mysql>show status:
结果发现
| Com_update | 754076 |
| Com_update_multi | 0 |
| Connections | 377076 |
怎么连接数到37万了?好奇怪啊
阅读(1448) | 评论(1) | 转发(0) |