[Spread-users] Spread contractors in SF Bay area?

Jonathan Stanton jonathan at cnds.jhu.edu
Thu Jan 10 14:05:55 EST 2002


If this is the problem, then there is an even easier way to fix it. When
you SP_connect to spread there is a parameter that allows you to say
whether or not you want membership messages on this connection or not. If
you flag the connection as not receiving membership, Spread will NEVER send
any messages to that connection except data messages that someone sends to
a group you have joined or to your private group. So if you set this flag
you will not have to do 0 timeout receives at all. 

This flag was exactly designed for applications that send only or do not
care about membership changes. 

I do not remember exactly how the Perl interface presents this flag, but in
the C library (which the perl wraps) it is the: 

int	SP_connect( const char *spread_name, const char *private_name,
		    int priority, int group_membership, mailbox *mbox,
		    char *private_group );

group_membership parameter. If it is set to 1 then you get membership
messages, if it is 0 you do not.

The flag is documented, but it is probably not emphasized enough that it
helps a lot with write-only applications and web tools.

I'd be interested to know if that solves your problem. I'm not sure because
the symptom I'd expect is your application getting disconnected after a
while, not the daemon itself appearing stuck.

Jonathan


On Thu, Jan 10, 2002 at 10:40:37AM -0800, Tom Mornini wrote:
> Hey, I think I've solved our problems! Must be a West Coast thing indeed!
> 
> The funny thing in our case is that I had solved this once before!
> 
> We have two ways that we log with Spread:
> 
> 1) STDIN to Spread for logging Apache access and error logs via a 
> customlog pipe
> 2) Our own application logging system
> 
> When this problem first started, I scratched my head and realized that 
> you can't just open a connection and write to it forever! Spread sends 
> special membership and perhaps some other messages (been a while since I 
> worked on the Spread details) to each and every mailbox each time 
> someone joins and leaves a shared mailbox.
> 
> If those messages aren't read on a regular basis then surely a buffer is 
> eventually going to fill up and cause some grief.
> 
> So, last night it occured to me that I had realized this and corrected 
> it in #1 above, but somehow had completely missed the fact that #2 does 
> exactly the same thing and has the same problem!
> 
> I looked at your code and you do the same thing.
> 
> So, here's what I do: I set the timeout value to zero, and do a receive 
> for each message I send. I don't DO anything with the received messages, 
> as I don't care about them, but just receiving them should tidy things 
> up for the Spread daemon.
> 
> I"ve applied this to our system, and we'll know in a couple of days if 
> this truly solves the problem 100%. Here's hoping!
> 
> --
> -- Tom Mornini
> -- eWingz Systems, Inc.
> --
> -- ICQ: 113526784, AOL: tmornini, Yahoo: tmornini, MSN: tmornini

-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------





More information about the Spread-users mailing list