Let's got in order:
* Slow insert. It's not "normal". You'd better check what you have in
the dbmail_headername tables, clean it up, and probabily disable the
dbmail_headername auto-insert. Can you give a few information on the DB
size as well? I'm not using pgsql but probably checking the indexes
would help a lot.
* LMTPD over INETD. There's a bug in the code (there is an open issue
for that) that causes lmtpd to get stuck in an infinite loop when used
thought inetd and the remote session get closed while receiving a mail.
I don't think there will be a fix in a short time for that BUT you can
overcome that with an utility called "timelimit". It just sits in the
pipe of the commands and if a subsequent command runs for more than X
seconds it kills it.
In my inetd.conf I'm running:
lmtpd stream tcp nowait/15 root /usr/local/bin/timelimit timelimit -t120
-T120 /usr/local/sbin/dbmail-lmtpd -n
And it works like a charm. It clearly doesn't fix the problem but at
least it gives you a working situation.
I can confirm that having multiple lmtpd dispatched by inetd is much
faster than the daemon. Furthermore it helps you a lot with the DB
Connection pool and avoid memory leaks.
---
Andrea Brancatelli
Schema31 S.p.a.
Chief Technology Officier
ROMA - FI - PA
ITALY
Tel: +39.06.98.358.472
Cell: +39.331.2488468
Fax: +39.055.71.880.466
Società del Gruppo OVIDIO TECH S.R.L.
On 2018-02-26 01:44, rich carroll wrote:
> Howdy folks,
>
> I'm running dbmail 3.2.3 on a postgresql db and am having slow inserts. About
> 2 seconds each. This is not really ok and it tends to get behind during peak
> usage or when someone emails every mailbox. I read that 2 seconds a message
> is not abnormal, can anyone confirm this?
>
> My solution is to run balance (https://www.inlab.de/balance.html) to round
> robin postfix to 4 instances of dbmail-lmtp. I've been running it this way
> for a couple days and it looks like it is going to work. Does anyone else do
> it this way or see a reason for me not to run it this way?
>
> I did try to run dbmail-lmtp in stdin/stdout mode and call it from xinetd but
> the processes weren't ending like I expected and I ended up with a lot of
> them running and having file pointer errors eventually. Has anyone made it
> work with xinetd or inetd and can share the config with me?
>
> Not really related but my pg_dump backup is a little over twice the size of
> my db on disk. Is this normal or should I start worrying about that?
>
> Thanks
> Rich
>
> _______________________________________________
> DBmail mailing list
> DBmail@dbmail.org
> http://lists.nfg.nl/mailman/listinfo/dbmail
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://lists.nfg.nl/mailman/listinfo/dbmail