Hello!
It's my mistake.
I using Set<Integer> for unique key(unique is unsigned short) for
session management. But I add when session opened and not remove when
session closed.
--
public static Set<Integer> Key = new HashSet<Integer>( Constants.MAX_NUM );
Random r = new Random();
int n = (r.nextInt( 2000000000 ) + 1) & 0xFFFF;
while( !Constants.Key.add( n ) ) {
n = r.nextInt( 2000000000 ) + 1 & 0xFFFF;
}
--
so, because of unique's data type unsigned short and I'm not remove
key of closed session, server is blocked when 65536 times open/close.
sorry and very thanks to Trustin & Raman Gupta!
On 8/13/07, Raman Gupta <[EMAIL PROTECTED]> wrote:
> Sungwon Jung wrote:
> > Thanks to Trustin. :-)
> >
> > As you said, I check TIME_WAIT of client side.
> >
> > --
> > [client side] (9009 is server port)
> > $ netstat -an | grep 9009 | wc -l
> > 15084
>
> Try this instead:
>
> netstat -an | grep TIME_WAIT | wc -l
>
> I think that will give you a truer picture on the client, since the
> client should be allocating ephemeral ports for the connection. See:
>
> http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
>
> Also, if you run one client to the point where things hang up, then
> start a second client on a separate machine to the same server, does
> the second client also hang up?
>
> Cheers,
> Raman Gupta