pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedApache child processes making multiple persistent database connections via Apache::DBI
2+ messages / 2 participants
[nested] [flat]
* Apache child processes making multiple persistent database connections via Apache::DBI
@ 2003-02-01 00:47 Ben Borger <spd@platinumsystems.net>
0 siblings, 1 reply; 2+ messages in thread
From: Ben Borger @ 2003-02-01 00:47 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
Is it normal for Apache child threads to be opening more than one persistent
database connection to Postgres? DBI 1.19, Apache::DBI 0.88
In Apache's configuration I have the maximum threads limited to 12, and
Postgres is set to allow a maximum of 32 connections. No other apps or
users. Periodically I receive an error that there are too many connections
to the database already and the connect attempt is refused. Does this infer
a programming problem or Apache/Postgresql configuration problem, or is it
normal, in which case what is the recommended ratio of threads to database
connections?
Thanks!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Apache child processes making multiple persistent
@ 2003-02-10 07:39 Mark Kirkwood <markir@paradise.net.nz>
parent: Ben Borger <spd@platinumsystems.net>
0 siblings, 0 replies; 2+ messages in thread
From: Mark Kirkwood @ 2003-02-10 07:39 UTC (permalink / raw)
To: pgsql-interfaces
Ben Borger wrote:
> Hello,
>
> Is it normal for Apache child threads to be opening more than one
> persistent
> database connection to Postgres? DBI 1.19, Apache::DBI 0.88
>
>
>
How I think it works is :
Each connection to the db for a userid and an apache child results in a
persistent connection.
So if user1, user2 both get serviced by apache child 1, then it ends up
with a persistent connection for each of them.
How this problem is often circumvented is to authenticate externally,
save credentials (or an id for them) in a cookie, and do all db work by
means 1 synthetic database userid.
best wishes
Mark
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-02-10 07:39 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-01 00:47 Apache child processes making multiple persistent database connections via Apache::DBI Ben Borger <spd@platinumsystems.net>
2003-02-10 07:39 ` Re: Apache child processes making multiple persistent Mark Kirkwood <markir@paradise.net.nz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox