>"How high is too high?"
>400 or so concurrent emails being sent seems to trigger this behavior
Each copy of qmail-inject runs qmail-queue, and if you're using popen,
there's probably also a shell process waiting for them to finish.
That's 1200 processes, which is quite a lot. Any chance you're
hitting a process limit?
If you want to inject that much mail into qmail, I'd suggest using the
approach my Qspam perl module does. It puts the formatted message
into a file rather than a pipe, then calls qmail-remote directly to
try to deliver messages to remote addreses and only queues it with
qmail-queue if the remote delivery fails or the address is local. It
doesn't need to use threads, just keeps track of the PIDs of the
qmail-remote and qmail-queue processes, and it's really fast since it
avoids the slow queue/dequeue process for most messages.. It's not
very complicated, shouldn't be hard to translate into python.
Regards,
John Levine, johnl@iecc.com, Primary Perpetrator of "The Internet for Dummies",
Information Superhighwayman wanna-be, http://www.johnlevine.com, ex-Mayor
"More Wiener schnitzel, please", said Tom, revealingly.
|