使用tuning-primer.sh优化服务器
提示:
Current max_connections = 16000
Current threads_connected = 543
Historic max_used_connections = 1099
The number of used connections is 6% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating大家能说说为啥过大的max_connections有什么问题吗

解决方案 »

  1.   

    没什么问题,但connection 过多会造成内存耗尽
      

  2.   

    狼头的意思是说max_connections相当于一个限制,防止同时连接过多,占用完mysql内存,导致服务down掉?
      

  3.   

    max_connections是指整个mysql服务器的最大连接数; 允许同时连接MySQL服务器的客户数量。如果超出该值,MySQL会返回Too many connections错误,但通常情况下,MySQL能够自行解决。
      

  4.   

    你算下你的最大connection乘以每个连接需要的内存 加上固定分配出去的innodb和myisam的内存 还够不够你系统的内存
      

  5.   

    大部分数据库产品都有这个限制。比如ORACLE同样要限制最大的SESSION数量。否则,别人只需要开上10000个连接就导致你的整个LINUX系统死机。 加上限制后,最多是MYSQL数据库本身拒绝新连接,但不会导致服务器宕机。