作者:手机用户2502870457 | 来源:互联网 | 2023-06-24 11:34
mysql异常:com.mysql.jdbc.CommunicationsException:Thedriverwasunabletocreateaconnectiondu
mysql异常:
com.mysql.jdbc.CommunicationsException: The driver was unable to create a connection due to an inability to establish the client portion of a socket.
This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.
For Unix-based platforms, see the manual page for the ‘ulimit‘ command. Kernel or system reconfiguration may also be required.
由抛出的异常可以推断出:是客户端不断的查询数据库所导致的;
解决方法:检查数据库表查询的方法,查看是否有方法不断的调用工具类并创建连接查询数据库吗,导致了连接数量过多 ;