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.
译:由于无法建立套接字的客户端部分,驱动程序无法创建连接。
原因:由于客户端不断与数据库建立连接,超过最大连接数,无法再连接。
解决方法:修改数据库地最大连接数、减少数据库地频繁连接、使用连接池。