[Spread-users] Re:[Fwd: Re: [Spread-users] Spread

Daniel Rall dlr at finemaltcoding.com
Thu Feb 6 12:02:56 EST 2003


"Cosimo Calabrese" <the_tube at libero.it> writes:

> Cosimo Calabrese wrote:
> 
> >I'm working with a group communication Java application based on
> >Spread; this application sends messages to Spread, and Spread sends
> >them in multicast to a cluster.
> >
> >When I try to send a lot of messages per second, Spread kills the
> >receiving group member after the reception of a certain number of
> >messages. The java application reports this error:
> >
> >spread.SpreadException: read(): java.net.SocketException: Connection reset
> >at spread.SpreadConnection.internal_receive(SpreadConnection.java:1057)
> >at spread.SpreadConnection.receive(SpreadConnection.java:1021)
> >
> >This error doesn't happen when I send messages at a slower rate.
> >
> >Any hint? I think that Spread kills me when the input buffers are
> >full. How can I resolve this problem? Should I modify any of the
> >#define variables?
> >  
> >
> Yes, Spread does disconnect client sessions for not receiving when its 
> buffers get full.  To solve this, you could look at extending buffers to 
> make it more unlikely that Spread will need to disconnect your client. 
>  However, if its really a case of your sender overwhelming the receiver, 
> the only solution that will prevent this problem from recurring is 
> implementing some flow control.  Probably something simple is all you 
> will need.  What is you application like?  What is your Spread 
> configuration like?  Someone can try to answer your question more 
> specifically with further information.
> 
> 
> Ok, but I think that a flow control is very hard to implement in my
> case; how can I extend the Spread buffers instead?

Hi Cosimo.  I've found myself floating in the exact same boat which
you're in now.  To extend the server's buffer, you can patch the
Spread daemon like so:

Index: spread_params.h
===================================================================
RCS file: /storage/cvsroot/spread/daemon/spread_params.h,v
retrieving revision 1.4
diff -u -u -r1.4 spread_params.h
--- spread_params.h	24 Jan 2002 04:48:25 -0000	1.4
+++ spread_params.h	1 Apr 2002 23:33:28 -0000
@@ -74,7 +74,7 @@
 #include        "sp_events.h"
 #define		MAX_SESSIONS		( ( MAX_FD_EVENTS-5 ) / 2 ) /* reserves 2 for each connection */
 
-#define		MAX_SESSION_MESSAGES	1000
+#define		MAX_SESSION_MESSAGES	5000
 #define         MAX_GROUPS_PER_MESSAGE  100     /* Each multicast can't send to more groups then this */
 
 #endif /* INC_SPREAD_PARAMS */


-- 

Daniel Rall <dlr at finemaltcoding.com>




More information about the Spread-users mailing list