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