[Spread-users] Spread Reliability

John Lane Schultz jschultz at spreadconcepts.com
Tue Mar 27 14:30:41 EDT 2007

Gordan Bobic wrote:
> This could be a problem in the spread library that the Perl library is 
> linked against, rather than the daemon itself. What happens is that 
> Spread::receive() will suddenly start returning an empty data set. Once 
> this happens, stopping the sender/flooder will not have any effect - the 
> Spread::receive() call will keep returning nothing immediately (rather 
> than blocking for a message).

Are you sure you are checking the return code from receive and that it is 
greater than or equal to zero?

> The only way to recover from the situation is to call Spread::disconnect 
> and then re-connect. In a flooding situation (i.e. stress testing), this 
> happens approximately 20-30 times in the 60 seconds or so that it takes to 
> send 100,000 test messages. That means that the disconnect/reconnect cycle 
> lasts about 1,000 messages, plus the 1,000 messages that are queued that 
> get lost whene the listener disconnects. This, times 20-30 accounts for 
> the 50,000-60,000 messages that get lost out of 100,000. Message size was 
> arbitrarily picked to be about 10,000 bytes. With 1400 byte messages (i.e. 
> such that they fit into a single UDP packet), the messages do seem to get 
> reliably delivered without silent connection breakages.

As Theo said, you might be getting disconnected from Spread for sending too fast 
  / not receiving fast enough, which happens when ~1000 msgs queue up inside the 
daemon.  If that happens, then you should get CONNECTION_CLOSED errors from the 
Spread library for subsequent calls on that mailbox.


John Schultz
Spread Concepts LLC
Phn: 443 838 2200
Fax: 301 560 8875

More information about the Spread-users mailing list