max.connections=100

文章讲述了在SpringBoot应用中使用Ebean时遇到的数据库连接问题,由于max_connections值过低(5000),导致查询请求失败,提示需要增加连接数或检查是否存在连接池泄漏。
摘要由CSDN通过智能技术生成

2024-01-25 14:25:33.194 ERROR [http-nio-8888-exec-59] [-] o.a.c.c.C.[.[.[.[dispatcherServlet][175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is javax.persistence.PersistenceException: java.sql.SQLException: Unsuccessfully waited [1000] millis for a connection to be returned. No connections are free. You need to Increase the max connections of [100] or look for a connection pool leak using datasource.xxx.capturestacktrace=true] with root cause java.sql.SQLException: Unsuccessfully waited [1000] millis for a connection to be returned. No connections are free. You need to Increase the max connections of [100] or look for a connection pool leak using datasource.xxx.capturestacktrace=true at org.avaje.datasource.pool.PooledConnectionQueue._getPooledConnectionWaitLoop(PooledConnectionQueue.java:357) at org.avaje.datasource.pool.PooledConnectionQueue._getPooledConnection(PooledConnectionQueue.java:331) at org.avaje.datasource.pool.PooledConnectionQueue.getPooledConnection(PooledConnectionQueue.java:271) at org.avaje.datasource.pool.ConnectionPool.getPooledConnection(ConnectionPool.java:712) at org.avaje.datasource.pool.ConnectionPool.getConnection(ConnectionPool.java:700) at com.avaje.ebeaninternal.server.transaction.TransactionManager.createQueryTransaction(TransactionManager.java:302) at com.avaje.ebeaninternal.server.core.DefaultServer.createQueryTransaction(DefaultServer.java:2065) at com.avaje.ebeaninternal.server.core.OrmQueryRequest.initTransIfRequired(OrmQueryRequest.java:217) at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1370) at com.avaje.ebeaninternal.server.core.DefaultServer.findUnique(DefaultServer.java:1121)

mysql> SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 5000  |
+-----------------+-------+
1 row in set (0.32 sec)

mysql> SHOW GLOBAL STATUS LIKE 'Max_used_connections';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 380   |
+----------------------+-------+
1 row in set (1.26 sec)
 

  • 12
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

leegoo_V

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值