error:No buffer space available (maximum connections reached

2015-02-02 17:49:09,035 ERROR basic.DBManager - Failded to establish the connection.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure

The last packet sent successfully to the
server was 0 milliseconds ago. The driver has not received any
packets from the server.
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
 at
java.lang.reflect.Constructor.newInstance(Unknown Source)
 at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)

at
com.mysql.jdbc.MysqlIO.(MysqlIO.java:344)
 at
com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2333)

at
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)

at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)

at
com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:792)
 at
com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
 at
sun.reflect.GeneratedConstructorAccessor4.newInstance(Unknown
Source)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
 at
java.lang.reflect.Constructor.newInstance(Unknown Source)
 at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)

at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)

at java.sql.DriverManager.getConnection(Unknown
Source)
 at java.sql.DriverManager.getConnection(Unknown
Source)
 ...

Caused by: java.net.SocketException: No
buffer space available (maximum connections reached?):
connect
 at
java.net.DualStackPlainSocketImpl.connect0(Native Method)
 at
java.net.DualStackPlainSocketImpl.socketConnect(Unknown
Source)
 at
java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
 at
java.net.AbstractPlainSocketImpl.connectToAddress(Unknown
Source)
 at
java.net.AbstractPlainSocketImpl.connect(Unknown Source)
 at java.net.PlainSocketImpl.connect(Unknown
Source)
 at java.net.SocksSocketImpl.connect(Unknown
Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.(Unknown Source)
 at java.net.Socket.(Unknown Source)
 at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)

at
com.mysql.jdbc.MysqlIO.(MysqlIO.java:294)
 ... 19 more
Exception in thread "main" java.lang.NullPointerException
 ...

最后的NullPointerException是指connection。

解决方案:减少connection的数量。

参考:http://ilyljc007.blog.163.com/blog/static/1623518992011111162336911/

原因:与db的连接过多。即使connection closed也不行。

时间: 2024-10-07 15:56:59

error:No buffer space available (maximum connections reached的相关文章

连接db2数据库出现No buffer space available (maximum connections reached?)

Caused by: javax.naming.NamingException: [jcc][t4][2043][11550][3.57.82] 异常 java.net.SocketException:打开端口 50,000 上服务器 localhost/127.0.0.1 的套接字时出错,消息为:No buffer space available (maximum connections reached?): connect. ERRORCODE=-4499, SQLSTATE=08001 数

Windows 7下解决: java.net.SocketException: No buffer space available (maximum connections reached?)

查了一大堆网上的资料全都没用,Google得知,是Windows 7 的socket泄漏 : https://supportkb.riverbed.com/support/index?page=content&id=S23580&actp=LIST_RECENT 补丁下载地址:  http://support.microsoft.com/kb/2577795 记录一下. Windows 7下解决: java.net.SocketException: No buffer space avai

java.net.SocketException:No buffer space avaliable(maximum connection reached?):JVM_Bind 解决办法

No buffer space available 2009-06-15 14:03 java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind 2009-04-14 09:10 公司服务器最近几天一直报错误,大概运行一天就报如下异常. java.net.SocketException: No buffer space available (maximum connect

socket-详细分析No buffer space available(转)

新年上班第一天,突然遇到一个socket连接No buffer space available的问题,导致接口大面积调用(webservice,httpclient)失败的问题,重启服务器后又恢复了正常. 问题详情 具体异常栈信息如下: Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect at org.apache.axis.AxisFault

No buffer space available 一次神奇的维护经历

前段时间在项目维护当中遇见一个问题,方便以后再次遇见类似的问题,可以参考解决问题的思路,记录如下: 问题概述: 维护项目当中,客户这边发来消息,称自己的网站登录不上去了,提示用户名密码错误,我就登录到服务器上查看系统日志和报错情况,如图: ? 这个异常来源部署的一个jar包,用于读取数据存入mongodb,再看了Tomcat也报错了,错误是:java.net.SocketException.看完这样的问题后,没有确切的解决方案,自己一脸懵逼无奈的重新启动服务,可以正常登陆.没有什么问题是重启解决

LR报错 No buffer space available Try changing the registry value 端口号不够用了

报错:Action.c(6): Error -27796: Failed to connect to server "10.16.137.8:10035": [10055] No buffer space availableTry changing the registry value HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelay to 30and HKEY

java.net.SocketException: No buffer space available

今天写了一个4线程并发发送10W条数据,但是在发送1W2左右时,突然开始报java.net.SocketException: No buffer space available异常,经过相关资料的查询,发现是Windows Server 2008 R2 或 Windows 7 的多处理器计算机上都存在的问题,具体可以参照window官方的解释;地址为:http://support.microsoft.com/kb/2577795 我本人的电脑是window7四核的处理器: java.net.So

ORA-06502:PL/SQL :numberic or value error: character string buffer too small

今天遇到一个错误提示:ORA-06502:PL/SQL :numberic or value error: character string buffer too small,一般对应的中文信息为:ORA-06502: PL/SQL: 数字或值错误 :字符串缓冲区太小.仔细检查调试过程中才发现是开发人员定义了一个变量,但是在脚本里面赋予了该变量超过其长度的值. 比如: 1: DECLARE 2:  3: c VARCHAR2(3 CHAR); 4:  5: BEGIN 6:  7: c := '

log buffer space事件(转)

看了这篇文章: Oracle常见的等待事件说明http://database.ctocio.com.cn/tips/38/6669538.shtml 对于Log Buffer Space-日志缓冲空间描述如下: 当你将日志缓冲(log buffer)产生重做日志的速度比LGWR 的写出速度快,或者是当日志切换(log switch)太慢时,就会发生这种等待.这个等待出现时,通常表明redo log buffer 过小,为解决这个问题,可以考虑增大日志文件的大小,或者增加日志缓冲器的大小. 另外一