免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1892 | 回复: 4
打印 上一主题 下一主题

为什么mysql最大连接数始终都是265? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-25 00:16 |只看该作者 |倒序浏览
操作系统centos4.4,mysql5.0.25

./webbench -c 1500 -t 30 做压力测试时mysql的最大连接数始终都是265?

my.cnf 如下:

[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock
default-character-set = gbk

[mysqld_safe]
datadir = /usr/local/mysql/data
log-error = /usr/local/mysql/data/mysql_error.log
pid-file = /usr/local/mysql/data/mysql.pid
           
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
default-character-set = gbk
#init_connect = 'SET NAMES gbk'
skip-locking
#skip-slave-start
key_buffer = 512M
max_allowed_packet = 2M
table_cache = 1024
sort_buffer_size = 32M
read_buffer_size = 2M
read_rnd_buffer_size = 32M
max_length_for_sort_data = 64
myisam_sort_buffer_size = 128M
thread_cache = 8
query_cache_size = 64M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
#skip-name-resolve
set-variable = max_connections=1000
open_files_limit = 51200
ft_min_word_len = 1

low_priority_updates = 1
slave-skip-errors = 1032,1062,126
server-id       = 9
[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 = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

是不是操作系统哪里还有限制啊?

论坛徽章:
0
2 [报告]
发表于 2009-07-25 11:40 |只看该作者
贴上你的测试结果  或许是apache上限制了

论坛徽章:
0
3 [报告]
发表于 2009-07-25 23:01 |只看该作者
你所说的MySQL的最大连接数为265是怎么得到的?
我也没看到你在my.cnf中定义你的连接数。

论坛徽章:
0
4 [报告]
发表于 2009-07-26 16:01 |只看该作者
show variables like 'max_connections' ;

论坛徽章:
0
5 [报告]
发表于 2009-07-28 14:25 |只看该作者
也许程序里写了,初始化 就分配256个连接在那里!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP