简体   繁体   English

MySQL的max_connection限制

[英]Mysql max_connection limit

I have to increase the max_connection limit of mysql increase to 1000. 我必须将mysql的max_connection限制增加到1000。

By edit the /etc/my.cnf also another way by SET GLOBAL max_connection=1000. 通过SET GLOBAL max_connection = 1000,也可以通过另一种方式编辑/etc/my.cnf。

Its update the varibale size of max_connections=1000 but when i test my site with 100,200...400 concurrent users respectively but the max_connection cant go high more than 150. 它更新了max_connections = 1000的变量大小,但是当我分别以100,200 ... 400个并发用户测试我的站点时,max_connection不能超过150。

Please help me out on this query. 请帮我解决这个查询。

Thanks, 谢谢,

  1. Re-start your server. 重新启动服务器。 For any configuration to take effect, it requires reloading. 为了使任何配置生效,需要重新加载。

  2. It is not for 'concurrent users' it means, how many connections you can open. 它不是针对“并发用户”的,它意味着可以打开多少个连接。

  3. Bandwidth plays an important role. 带宽起着重要作用。 What is the response header that you get? 您得到的响应头是什么? Are you sure it is MySQL only? 您确定它仅是MySQL吗? 1000 concurrent users = 1000 concurrent database queries. 1000个并发用户= 1000个并发数据库查询。 What about spooling mechanism? 假脱机机制如何?

  4. What you're trying to do is max_user_connections and NOT max_connections . 您想要做的是max_user_connections而不是max_connections I assumed it when you wrote " *i test my site with 100,200...400 concurrent users respectively but the max_connection cant go high more than 150.* " 当您撰写“ *我分别用100,200 ... 400个并发用户测试我的站点,但max_connection不能超过150个时,我就假定了。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM