Marc Boorshtein wrote:
>> Well, this is a rampant problem we have, and it don't want to vanish...
> 
> Odd, why didn't this happen in the original version I used?
> 
>> If you are on linux, you can modify you TCP keepalive parameter to a
>> smaller
>> value, so the socket will be freed faster.
>>
> 
> This didn't work.  How does the ApacheDS team handle this issue in
> it's automated tests?
> 
>> The problem might be that you violently stop the server, and some sockets
>> are still pending, waiting for a timeout. If you gently stop the server,
>> then I *think* mina closes all the opened socket nicely, and left the
>> socket
>> available immediatly. To be verified...
>>
> 
> Was the code I was using to stop my server incorrect?
> 

Hmmm I did not have a chance to look thoroughly at the code.  However
there is a paramter for MINA that we do use that may help you.  Look
here ...

            // Disable the disconnection of the clients on unbind
            SocketAcceptorConfig acceptorCfg = new SocketAcceptorConfig();
            acceptorCfg.setDisconnectOnUnbind( false );
            acceptorCfg.setReuseAddress( true );
            acceptorCfg.setFilterChainBuilder( chainBuilder );
            acceptorCfg.setThreadModel( threadModel );


((SocketSessionConfig)(acceptorCfg.getSessionConfig())).setTcpNoDelay(
true );

            tcpAcceptor.bind( new InetSocketAddress( port ),
protocolProvider.getHandler(), acceptorCfg );


Make sure you're using the following parameters to the acceptor config.
 Namely the reuse address true parameter.

HTH,
Alex
begin:vcard
fn:Alex Karasulu
n:Karasulu;Alex
org:Apache Software Foundation;Apache Directory
adr:;;1005 N. Marsh Wind Way;Ponte Vedra ;FL;32082;USA
email;internet:[EMAIL PROTECTED]
title:Member, V.P.
tel;work:(904) 791-2766
tel;fax:(904) 808-4789
tel;home:(904) 808-4789
tel;cell:(904) 315-4901
note;quoted-printable:AIM: alexokarasulu=0D=0A=
	MSN: [EMAIL PROTECTED]
	Yahoo!: alexkarasulu=0D=0A=
	IRC: aok=0D=0A=
	PGP ID: 1024D/4E1370F8 BBCC E8D8 8756 2D51 C3D4 014A 3662 F96F 4E13 70F8=0D=0A=
	
x-mozilla-html:FALSE
url:http://people.apache.org/~akarasulu
version:2.1
end:vcard

Reply via email to