Great Circle Associates Majordomo-Workers
(April 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Problems with lock file
From: "John P. Rouillard" <rouilj @ cs . umb . edu>
Date: Fri, 07 Apr 1995 12:54:16 -0400
To: Jeff Okamoto <okamoto @ hpcc123 . corp . hp . com>
Cc: majordomo-workers @ greatcircle . com
In-reply-to: Your message of "Wed, 05 Apr 1995 13:14:36 PDT." <199504052014.AA075642876@hpcc123.corp.hp.com>


In message <199504052014.AA075642876@hpcc123.corp.hp.com>,
Jeff Okamoto writes:
>This problem is really starting to piss me off.
>
>I'm getting a number of requests from AOL, and their mailer queues stuff up
>and sends them to me in a big batch.  The number of ABORT's I get seems
>to be exponential of the number of requests that come in simultaneously
>(two is bad, three is awful, four totally overwhelms me).
>
>The kicker is that the entry is added to the list file.  However, I still
>keep getting abort messages, even after they've been added.
>
>My only recourse is to stop sendmail and delete all the various instances
>in the queue.  This is undesirable.

Until a shlock.pl replacement is ready, I am afraid you may have to
grin and bear it. One thing that may help is to try the following
hack:

At the beginning of majordomo, have it try to lock one of n files. If
it doesn't get a lock immediatly on one of the files, it exists with
error 75 (EX_TEMPFAIL) This should force sendmail to keep the job in
the queue and retry later. This is the mechanism I am using to limit
the number of simultaneous majordomo's and resends that can run at a
time.

Something like the code below after including shlock.pl in
majordomo.pl should do the trick.

	foreach $i (1..10) {
		last if shlock("/tmp/locks/$i");
	}

	$LOCKFILE="/tmp/locks/$i";

	exit (75) if ! stat $LOCKFILE;

It would be nice if majordomo cleaned up the lockfile just before it
exited, but its not required since shlock.pl will acquire the lock if
the process no longer exists.

				-- John
John Rouillard

Senior Systems Administrator		  IDD Information Services
rouilj@dstar.iddis.com			  Waltham, MA (617) 890-7227 x337
						      (617) 487-3937 (Direct)
Senior Systems Consultant (SERL Project)  University of Massachusetts at Boston
rouilj@cs.umb.edu (preferred)	          Boston, MA, (617) 287-6480
===============================================================================
My employers don't acknowledge my existence much less my opinions.



References:
Indexed By Date Previous: Re: approve and From lines
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Next: Re: 3 problems: (1) majordomo erasing lists, (2) echo help, (3) medit
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Indexed By Thread Previous: Problems with lock file
From: Jeff Okamoto <okamoto@hpcc123.corp.hp.com>
Next: More on the problem with the lock file
From: Jeff Okamoto <okamoto@hpcc123.corp.hp.com>

Google
 
Search Internet Search www.greatcircle.com