赞
踩
今天在本地debug代码的时候,没有断点执行完毕,导致测试环境前端调用测试服务器服务的时候出现了问题:
1. org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: Retail_HikariCP - Connection is not available, request timed out after 30000ms.
2. com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction。
因为测试服务器和本地代码连接的数据库一致,debug锁表同时数据的连接池无法被释放导致连接无法继续获得连接池中的连接。
基于此我将debug的断点放开执行完后,问题就自然的解决了。
个人粗略的理解,如有更深入的理解望各位告知...
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。