Thanks folks, that's makes more sense, so you can have multiple services on one connection. Cleanup the services via the dispose() and cleanup the connection via close()
Cheers Arv -----Original Message----- From: Arv Mistry [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2008 11:41 AM To: users@mina.apache.org Subject: RE: Too many open files Niklas, I see, on the server side the port is in the LISTEN state and when I connect my client, the port is in the state ESTABLISHED, this then is removed when I disconnect. I think that's all correct. But when I do a lsof -p <pid> | wc -l it appears not all the services are cleaned up i.e. there are a lot of eventpoll and socket instances. I must be not cleaning up properly; I'm using NioSocketConnector().connect to connect to the client. I get the session from the ConnectFuture that that returns. I then call the close() on this when disconnecting. Am I missing something? Do I need to call the dispose() on the NioSocketConnetor also? Thanks again. Cheers Arv -----Original Message----- From: Niklas Gustavsson [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2008 12:34 PM To: users@mina.apache.org Subject: Re: Too many open files On Fri, Jul 4, 2008 at 10:05 PM, Arv Mistry <[EMAIL PROTECTED]> wrote: > Are there any known issues with Mina 2.0, leaving too many open file > descriptors? > > I have simplified my client, so all I do is connect to a server and > disconnect (i.e. call close() on session . > This is triggered by command line input so that I can control it. > > I find when I do a lsof -p <pid> | wc -l following the > connect/disconnect, that the number goes up by 20 each time and stays > up. I'm not familiar with TCP at that low a level but it seems to be > the pipe/eventpoll instances that arent cleaned up. If you do a netstat -a do you see sockets on your port, if so, what state are they in? /niklas