Re: Mailman & Sendmail problems
![](https://secure.gravatar.com/avatar/e3a7c3d01d08531d60ccd12215a563b8.jpg?s=120&d=mm&r=g)
Hey Barry,
Thanks for the info on how 2.1's "cron" works... So does it still wait until the next minute to check for messages if it isn't currently processing any, or do they get processed immediately?
Bob
![](https://secure.gravatar.com/avatar/cb6b2a19d7ea20358a4c4f0332afc3ef.jpg?s=120&d=mm&r=g)
"B" == Bob <bob@nleaudio.com> writes:
B> Thanks for the info on how 2.1's "cron" works... So does it
B> still wait until the next minute to check for messages if it
B> isn't currently processing any, or do they get processed
B> immediately?
In MM2.1, if a particular qrunner (remember, we now have several separate queues) finds no files to process, it goes to sleep for a while (time.sleep()) then checks again when it wakes up.
I misspoke earlier, the default sleep interval is 1 second, not 1 minute (this is configurable in mm_cfg.py).
It has to do this, or it'll busy loop. I don't know of a good, portable way to wait on new files showing up in a directory.
-Barry
![](https://secure.gravatar.com/avatar/1be385016e7c6dcd5eb874cc8be7c13b.jpg?s=120&d=mm&r=g)
It has to do this, or it'll busy loop. I don't know of a good, portable way to wait on new files showing up in a directory.
How about having the process which puts messages into the queue send a SIGUSR (or whatever) signal to qrunner?
Greetings, Norbert.
-- Norbert Bollow, Weidlistr.18, CH-8624 Gruet (near Zurich, Switzerland) Your own domain with all your Mailman lists: $15/month http://cisto.com Business Coaching for Internet Entrepreneurs ---> http://thinkcoach.com Tel +41 1 972 20 59 Fax +41 1 972 20 69 nb@freedevelopers.net
![](https://secure.gravatar.com/avatar/2206e8a0d58563f815a7568ea6675313.jpg?s=120&d=mm&r=g)
On Saturday, June 30, 2001, at 03:38 AM, Norbert Bollow wrote:
How about having the process which puts messages into the queue send a SIGUSR (or whatever) signal to qrunner?
Do what biff or INND do. Create a socket somewhere, and when you want to signal qrunner, write to it. qrunner's idle loop can then select() off the socket and go to sleep until soemthing gets written to it.
-- Chuq Von Rospach, Internet Gnome <http://www.chuqui.com> [<chuqui@plaidworks.com> = <me@chuqui.com> = <chuq@apple.com>] Yes, yes, I've finally finished my home page. Lucky you.
Any connection between your reality and mine is purely coincidental.
![](https://secure.gravatar.com/avatar/cb6b2a19d7ea20358a4c4f0332afc3ef.jpg?s=120&d=mm&r=g)
"NB" == Norbert Bollow <nb@thinkcoach.com> writes:
>> It has to do this, or it'll busy loop. I don't know of a good,
>> portable way to wait on new files showing up in a directory.
NB> How about having the process which puts messages into the
NB> queue send a SIGUSR (or whatever) signal to qrunner?
"CVR" == Chuq Von Rospach <chuqui@plaidworks.com> writes:
CVR> Do what biff or INND do. Create a socket somewhere, and when
CVR> you want to signal qrunner, write to it. qrunner's idle loop
CVR> can then select() off the socket and go to sleep until
CVR> soemthing gets written to it.
I've thought about both of these and (so far) rejected them because of the additional complexity for not much gain. A busy Mailman site will gain nothing if there will always be files in the directory the next time the runner looks. For a completely idle site, the 1-second sleep busy loop seems to impose very little overhead and should be responsive enough to new incoming mail that it shouldn't matter.
But this isn't set in stone, so if during the alpha-beta cycle we find that the sleep-busy loop is too expensive, I'll probably adopt the biff/innd approach.
-Barry
![](https://secure.gravatar.com/avatar/1be385016e7c6dcd5eb874cc8be7c13b.jpg?s=120&d=mm&r=g)
I make an entirely seperate Mailman installation for every customer. This allows patching Mailman for any customer according to their specific needs without risking to break anything for the other customers. Is it really a good idea to have *many* mailmans all doing a sleep-busy loop?
Greetings, Norbert.
-- Norbert Bollow, Weidlistr.18, CH-8624 Gruet (near Zurich, Switzerland) Your own domain with all your Mailman lists: $15/month http://cisto.com Business Coaching for Internet Entrepreneurs ---> http://thinkcoach.com Tel +41 1 972 20 59 Fax +41 1 972 20 69 nb@freedevelopers.net
![](https://secure.gravatar.com/avatar/cb6b2a19d7ea20358a4c4f0332afc3ef.jpg?s=120&d=mm&r=g)
"B" == Bob <bob@nleaudio.com> writes:
B> Thanks for the info on how 2.1's "cron" works... So does it
B> still wait until the next minute to check for messages if it
B> isn't currently processing any, or do they get processed
B> immediately?
In MM2.1, if a particular qrunner (remember, we now have several separate queues) finds no files to process, it goes to sleep for a while (time.sleep()) then checks again when it wakes up.
I misspoke earlier, the default sleep interval is 1 second, not 1 minute (this is configurable in mm_cfg.py).
It has to do this, or it'll busy loop. I don't know of a good, portable way to wait on new files showing up in a directory.
-Barry
![](https://secure.gravatar.com/avatar/1be385016e7c6dcd5eb874cc8be7c13b.jpg?s=120&d=mm&r=g)
It has to do this, or it'll busy loop. I don't know of a good, portable way to wait on new files showing up in a directory.
How about having the process which puts messages into the queue send a SIGUSR (or whatever) signal to qrunner?
Greetings, Norbert.
-- Norbert Bollow, Weidlistr.18, CH-8624 Gruet (near Zurich, Switzerland) Your own domain with all your Mailman lists: $15/month http://cisto.com Business Coaching for Internet Entrepreneurs ---> http://thinkcoach.com Tel +41 1 972 20 59 Fax +41 1 972 20 69 nb@freedevelopers.net
![](https://secure.gravatar.com/avatar/2206e8a0d58563f815a7568ea6675313.jpg?s=120&d=mm&r=g)
On Saturday, June 30, 2001, at 03:38 AM, Norbert Bollow wrote:
How about having the process which puts messages into the queue send a SIGUSR (or whatever) signal to qrunner?
Do what biff or INND do. Create a socket somewhere, and when you want to signal qrunner, write to it. qrunner's idle loop can then select() off the socket and go to sleep until soemthing gets written to it.
-- Chuq Von Rospach, Internet Gnome <http://www.chuqui.com> [<chuqui@plaidworks.com> = <me@chuqui.com> = <chuq@apple.com>] Yes, yes, I've finally finished my home page. Lucky you.
Any connection between your reality and mine is purely coincidental.
![](https://secure.gravatar.com/avatar/cb6b2a19d7ea20358a4c4f0332afc3ef.jpg?s=120&d=mm&r=g)
"NB" == Norbert Bollow <nb@thinkcoach.com> writes:
>> It has to do this, or it'll busy loop. I don't know of a good,
>> portable way to wait on new files showing up in a directory.
NB> How about having the process which puts messages into the
NB> queue send a SIGUSR (or whatever) signal to qrunner?
"CVR" == Chuq Von Rospach <chuqui@plaidworks.com> writes:
CVR> Do what biff or INND do. Create a socket somewhere, and when
CVR> you want to signal qrunner, write to it. qrunner's idle loop
CVR> can then select() off the socket and go to sleep until
CVR> soemthing gets written to it.
I've thought about both of these and (so far) rejected them because of the additional complexity for not much gain. A busy Mailman site will gain nothing if there will always be files in the directory the next time the runner looks. For a completely idle site, the 1-second sleep busy loop seems to impose very little overhead and should be responsive enough to new incoming mail that it shouldn't matter.
But this isn't set in stone, so if during the alpha-beta cycle we find that the sleep-busy loop is too expensive, I'll probably adopt the biff/innd approach.
-Barry
![](https://secure.gravatar.com/avatar/1be385016e7c6dcd5eb874cc8be7c13b.jpg?s=120&d=mm&r=g)
I make an entirely seperate Mailman installation for every customer. This allows patching Mailman for any customer according to their specific needs without risking to break anything for the other customers. Is it really a good idea to have *many* mailmans all doing a sleep-busy loop?
Greetings, Norbert.
-- Norbert Bollow, Weidlistr.18, CH-8624 Gruet (near Zurich, Switzerland) Your own domain with all your Mailman lists: $15/month http://cisto.com Business Coaching for Internet Entrepreneurs ---> http://thinkcoach.com Tel +41 1 972 20 59 Fax +41 1 972 20 69 nb@freedevelopers.net
participants (4)
-
barry@digicool.com
-
Bob Puff@NLE
-
Chuq Von Rospach
-
Norbert Bollow