Re: Postfix/Maildrop and too many connections issues

From: Sven Willenberger <sven(at)dmv(dot)com>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postfix/Maildrop and too many connections issues
Date: 2005-06-21 22:34:11
Message-ID: 1119393251.10290.34.camel@lanshark.dmv.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2005-06-21 at 13:49 -0700, Steve Crawford wrote:
> On Tuesday 21 June 2005 12:00 pm, Sven Willenberger wrote:
> > We have a system set up whereby postfix and maildrop gather user
> > info from a pg database (7.4.2 on FreeBSD 5.2.1) to do local mail
> > acceptance and delivery. I have configured max connections at 512
> > but I find that this is not enough and I get "connection limit
> > exceeded for non-superusers" errors. I see upon ps ax that there
> > are hundreds of idle connections (state I).
>
> I have a vague recollection from the Postfix list that under some
> circumstances Postfix does not explicitly close the connection to PG
> so the back-end may stick around till the tcp connection times out.
>
> In addition to ps, try "select * from pg_stat_activity()" and look at
> connections via netstat (check from both ends) to hunt for clues.
>
> I know that using old hardware and limiting Postfix to 200 connections
> I've handled a constant rate of over 9 deliveries/second. Is your
> mailserver load such that the need for 500+ simultaneous connections
> passes the "sniff test"?
>
> Cheers,
> Steve
>
This happens only occasionally (during severe mail floods) that the
connections top 500+ .. usually they hang around 50-150 connections. The
problem is that when the connection limit is reached, postfix/maildrop
does not fail/defer the delivery gracefully. A cursory look through the
code would indicate that the connection is closed, so trying to find out
where it hangs open would involve some debugging/time. I was hoping that
a way of the server closing the connetion would be possible or that
pgpool could handle and pool 1000 connections ...

Sven

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roman Neuhauser 2005-06-21 23:30:53 Re: Postfix/Maildrop and too many connections issues
Previous Message Tom Lane 2005-06-21 22:21:56 Re: [PATCHES] Removing Kerberos 4