[JDEV] phenomenon associated with frequent connections

DJ Adams dj.adams at pobox.com
Thu Oct 4 02:10:38 CDT 2001

On Wed, Oct 03, 2001 at 09:40:31PM -0700, Charles Owen wrote:
> Hello all.
> Consider this (admittedly pathological) test program:
> for ( i = 1 to 10 ) {
>      connect to Jabber server;
>      authenticate;
>      pull roster information;
>      disconnect from Jabber server;
>      sleep; (optional)
> }
> If I do not put the thread to sleep at the bottom of the loop, I run into 
> trouble on
> the sixth iteration -- and the trouble seems to arise consistently on the 
> sixth iteration. What
> actually happens is that on the sixth pass, I am able to establish a socket 
> connection,
> but as soon as I send an authentication packet, the server sends a TCP FIN 
> segment
> indicating that it's not going to interact with me anymore. After a few 

This sounds very much like the rate limiting mechanism kicking in.
The <rate/> directive in the configuration (jabber.xml) allows the
server admin to throttle the rate of connection on a socket. I think
the default might even look like this:

<rate points='5' time='25'/>

which says throttle the socket if more than 5 connection attempts are
made in 25 seconds. The throttle is relaxed after that 25 second period.


More information about the JDev mailing list