酷代码 AI
菜单
全部AI  /  热门  /  AI写代码神器
服务商

cause: org.springframework.jdbc.cannotgetjdbcconnectionexception: failed to obtain jdbc connection; nested exception is com.alibaba.druid.pool.getconnectiontimeoutexception: wait millis 6045, active 25, maxactive 700, creating 1, createelapsemillis 29424,

The error message you've posted is related to a Spring Framework and Alibaba Druid connection pool issue. Here's a breakdown of the error: `org.springframework.jdbc.CannotGetJdbcConnectionException`: This exception in Spring JDBC occurs when it fails to get a connection from the underlying data source. It typically means that although your application has requested a connection, the connection pool couldn't provide one. `nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException`: This exception specifically indicates that Druid, which is a high-performance connection pool used for databases, timed out while trying to get a connection. The 'wait millis 6045' suggests that Druid waited for 6045 milliseconds (a little over 6 seconds) before giving up. `active 25, maxActive 700`: These values represent the current number of active connections (25) and the maximum allowed active connections (700) as configured in the Druid connection pool. `creating 1, createElapsedMillis 29424`: This means that there is currently one connection being created ('creating 1') and it has taken 29424 milliseconds (about 29 seconds) to do so ('createElapsedMillis'), which exceeds the wait timeout. In summary, the issue seems to be that the Druid connection pool is unable to acquire a new JDBC connection within the allowed time limit because either all available connections are in use (active count is less than maxActive but still no free connections), or the creation of a new connection is taking too long. To resolve this issue, you could consider tuning your connection pool configuration such as increasing the wait timeout, checking why database connections are not being released timely, or optimizing the database performance if new connections are taking too long to create. [2024-03-06 11:26:40 | AI写代码神器 | 365点数解答]

相关提问