2009/10/23 Miriam Pena <[email protected]> > After about 30 hours of runtime, I see the following problem when the > application tries to open a TCP socket: > > java.net.SocketException: No buffer space available (maximum > connections reached?): connect > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(Unknown Source) > at java.net.PlainSocketImpl.connectToAddress(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.<init>(Unknown Source) > at java.net.Socket.<init>(Unknown Source) >
... there should be the interesting part of the stack trace here. Tomcat always produces full stack traces. If there's more in the trace, please post it. If there's not, is this a trace from your application code and is that code trimming the traces it produces? The trace here is of an outbound connection and mentions Socks - are you making outbound TCP connections to your other application via a Socks-enabled firewall? If so, are you *absolutely sure* your code always closes the connections and gets rid of the Socket objects? > Also whether anyone has seen this problem in Tomcat, and whether > upgrading the Tomcat server could help. > If it's a problem in the Socks implementation, you're more likely to benefit from looking for bug-fixes in the JVM. If it's a problem in the code that connects outbound, I suspect neither a Tomcat upgrade nor a JVM upgrade will fix it ;-). - Peter
