com.mysql.jdbc.CommunicationsException: The driver was unable to create a connection......

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.

由抛出的异常可以推断出:是客户端不断的查询数据库所导致的;

解决方法:检查数据库表查询的方法,查看是否有方法不断的调用工具类并创建连接查询数据库吗,导致了连接数量过多 



郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。