This one took a while to hunt down.....

There is a Timeout problem on my Macintosh
c.setSoTimeout(100); in connection handler causes problems.  It causes
timeouts when most insert commands are given.   I found that increasing the
value to 1000 fixed the problem for client interaction with the localhost.
However, in if the client tries to insert a file into another computer it
often times out in large files unless there is an extremely large value > 2
min.  

The odd thing is...it seems that the the timeout exception does not occur in
the code to which setSoTimeout refers...instead the timeout is thrown from
the conduit when the file is transferring.  The cause of the failure on the
Mac may be a bug in the VM or OS.  I think if you set SO_Timeout once it may
be applying it to the socket for the rest of its life.  This causes problems
if there is normal network latency and/or computer slowness during a file
transfer. 

I would argue that it would help everyone to set SO_Timeout to a larger
value, or better yet try to think of a way to do this without busy
waiting.(Reduce CPU usage)  For example, add an end of stream message or
message flag?

Until we add such a message, any released mac version will need to have
SO_Timeout increased at the of having extra threads sitting around.  Could
such a message be added?  What do you think?



Paul Kappler

> From: Oskar Sandberg <md98-osa at nada.kth.se>
> Reply-To: freenet-dev at lists.sourceforge.net
> Date: Thu, 13 Apr 2000 21:07:54 +0200
> To: freenet-dev at lists.sourceforge.net
> Subject: [Freenet-dev] Build 120

> 
> d) I caught a problem with a race condition in the ConnectionHandler that
> causing it to hang after reading a trailing field. I think this may have been
> the reason for nodes picking up so many threads and connections. Hopefully
> things will work better now.
> 
> -- 
> 
> Oskar Sandberg
> 


_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to