Re: mod_auth_pgsql 2.0.1 don't close the backend connection - Mailing list pgsql-general

From Kris Jurka
Subject Re: mod_auth_pgsql 2.0.1 don't close the backend connection
Date
Msg-id Pine.LNX.4.33.0310010419010.8555-200000@leary.csoft.net
Whole thread Raw
In response to mod_auth_pgsql 2.0.1 don't close the backend connection ?  ("Bruno BAGUETTE" <pgsql-ml@baguette.net>)
Responses RE : mod_auth_pgsql 2.0.1 don't close the backend connection
List pgsql-general

On Wed, 24 Sep 2003, Bruno BAGUETTE wrote:

> Hello,
>
> I use mod_auth_pgsql 2.0.1 with PostgreSQL 7.3.2 and Apache 2.0.47.
>
> It seems like that mod_auth_pgsql don't close the connection with the
> Postmaster, so after a few moments I get the famous "Non-superuser
> connection limit exceeded" error message.
>
> The max_connections value is 256 and there's only 5 users at the same
> time on this server (Intranet server).
>
> Is it a bug in the mod_auth_pgsql that don't close the connection or is
> it a setup somewhere ?
>

Yes, the mod_auth_pgsql series for Apache 2 is broken as you describe.  It
does not release the connection, but the change is intentional.  Looking
at the Changelog I see:

- now we reuse database connection,  2x speedup !!

Perhaps this is a good thing with different MPMs, but the standard prefork
module can exhaust the available connections quite quickly as you
describe.  Here is a patch for mod_auth_pgsql 2.0.1 that reverts it to the
previous behavior of a new connection per authentication.

I have added the maintainer to the cc: list, perhaps he has some input?

Kris Jurka

Attachment

pgsql-general by date:

Previous
From: Mike Leahy
Date:
Subject: Re: Did not find any relation named...
Next
From: "Daniel Schuchardt"
Date:
Subject: