jt-20180528 / pro_document_mycat

项目文档记录,一些技术栈预研文档
2 stars 1 forks source link

修改了自动回收jdbc线程时间拉长之后,发现jdbc连接数不够使用 #20

Open lujunGit opened 6 years ago

lujunGit commented 6 years ago

ERROR druid.sql.Statement - {conn-10082, pstmt-23668} execute error. update t_user set TOTAL_INCOME=TOTAL_INCOME+? where id=? java.sql.SQLException: backend connect: ConnectionException [code=1040, msg=Too many connections]

lujunGit commented 6 years ago

设置mysql的最大连接数:

  1. 直接运行sql语句: SET GLOBAL max_connections=1000; SHOW VARIABLES LIKE 'max_connections';

2.修改配置文件,在my.cnf或者my.ini中【mysqld】配置: max_connections=1000