ITeye博客

java连接mysql 连接数太多

zhangchengtest · 2015-08-03 12:00 · spring · mysql · 数据库 · Java · MySQL · Markdown

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too many connections

show full processlist:查看有多少个线程实例

service mysqld stop service mysqld start

show global variables like 'wait_timeout'

28800秒 = 8小时 show global variables like 'max_connections'

可以设置global set global wait_timeout = 200;

也可以在my.cnf修改 wait_timeout=100 interactive_timeout=100

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。