mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Peters" <spet...@visto.com>
Subject Strange loop back connections using a massive number of handles.
Date Fri, 01 Feb 2008 01:33:23 GMT
All,

We moved to MINA 2.0 a while ago and starting having problems where
after running for a while we get this exception:
	java.io.IOException: An existing connection was forcibly closed
by the remote host

Upon further analysis we are seeing that the process has over 100,000
handles that are attributed to loop back connections that are being
created down in the MINA layer.

Test specifications:
Java 1.6.0 u3 64bit Windows 2003 Server R2 and on 32bit Windows XP SP2
MINA 2.0 w/ latest tip from today Jan 31, 2008
slf4j-api-1.3.0
slf4j-simple-1.3.0

<main.java>
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;

public class main
{
	public static void main( String[] args )
	{
		System.out.println("Before no loopback connections");
		NioSocketAcceptor acceptor = new NioSocketAcceptor();
		System.out.println("After now there are ");
	}
}
</main.java>

Test Steps
1. Add breakpoints at the two println statements.
2. Run tcp view -->
http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx
3. Startup the test application find your java process in tcp view.
Note number of loop back socket connections
4. Proceed to second breakpoint at second println.
5. Note you will have 5 loop back connections associated with the java
jvm process

Why are there loop back socket connections being created since nothing
has been done at this point to bind to a port?  Though I don't have any
test application this also is occurring for client connections.  Over
time it seems more and more of these loopback connections are created
thus running the process out of handles or the machine out of loopback
socket ports.

Sadly starting tomorrow I will be porting our code back to 1.1.5 since
we are getting way too close to a deadline.

If others are seeing this I'd be happy to enter in a bug tomorrow but
thought I might see if this was seen by anyone else first.
 
Thank you,
Scott Peters

Mime
View raw message