dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.89k stars 2.06k forks source link

怎样修改长连接的超时时间呢? #355

Closed highfei2011 closed 6 years ago

highfei2011 commented 7 years ago

使用dubbox提供webservice对外接口服务,tomcat做容器,但是不知道怎么修改长链接的超时时间,导致链接一直不释放,而报错: 2017-08-16 14:11:04 [ pool-3-thread-567:78611903 ] - [ WARN ] com.ngaa.webservice.utils.DBConnectionFactory.getConnection(DBConnectionFactory.java:72) connection; before get the datasource ....................... 2017-08-16 14:11:04 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-232321:2181):78612338 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-232321/127.0.0.1:2181, unexpected error, closing socket connection and attempting reconnect java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at sun.nio.ch.IOUtil.read(IOUtil.java:192) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) 2017-08-16 14:11:05 [ pool-3-thread-559:78613531 ] - [ WARN ] com.ngaa.webservice.utils.DBConnectionFactory.getConnection(DBConnectionFactory.java:74) connection; dataSource url:jdbc:phoenix:bg-js-sz1-ib1,bg-js-sz1-ib2,bg-js-232321:2181:/hbase:log2hadoop@SINOCACHE.NET:/home/spark/conf/logp.keytab 后续一直报错: at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) 2017-08-16 15:18:33 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-232321:2181):82660687 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-232321/127.0.0.1:2181, unexpected error, closing socket connection and attempting reconnect java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at sun.nio.ch.IOUtil.read(IOUtil.java:192) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) 2017-08-16 15:18:33 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-sz1-ib1:2181):82660687 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-sz1-ib1/127.0.0.1:2181, unexpected error, closing socket connection and attempting reconnect java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at sun.nio.ch.IOUtil.read(IOUtil.java:192) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

highfei2011 commented 7 years ago

像是可以参考这个链接,我正在试。http://dubbo.io/user-guide/configuration/xml.html