thinkphp出现 mysql too many connections

thinkphp mysql too many connection
这个错误!
大家有没有遇到呀?
求助~
我的mysql最大连接数是300
图片描述

图片描述

阅读 7.4k
3 个回答

Mysql达到连接数上限了,修改一下mysql的配置即可。

show variables like '%max_connections%';
set global max_connections = 5000;

如果连接数比5000还多,那就要上主从复制读写分离了,避免单机读写上限。

登录mysql终端,使用show full processlist查看mysql连接信息。

重启mysql,或者立马断网,有可能你的mysql数据库被别人ddos了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题