From: | "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: PHPs PDO, apache and "never ending sessions" |
Date: | 2008-03-07 20:06:22 |
Message-ID: | b35603930803071206o70aac030g4177a387dff5441f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 07/03/2008, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> > A bit of poking around with ps and lsof showed me that a PHP
> > application I closed days ago (no browser open) was still active
> > tying up backend sessions; the problem went away when I
> > restarted my apache. Is this "normal behaviour"? How do I
> > deal with it under normal circumstance, am I just supposed
> > to increase the number of allowed connections and not worry
> > about apache holding sessions open even after the "client"
> > has long gone?
> It depends on how you are connecting. For example if you are doing this:
>
> PDO::ATTR_PERSISTENT => true
>
> Then... yeah :). You really shouldn't use a language layer for
> persistent connections though. Use pgbouncer or pgpool.
Thanks Joshua. It was indeed set to true; I was playing with
the "hatshop" database and application from the "Beginning
PHP and PostgreSQL E-Commerce" Apress book. And found
that config.php has "define('DB_PERSISTENCY', 'true');". Thanks
for pointing me in the right direction.
> Joshua D. Drake
Cheers,
Andrej
--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2008-03-07 20:09:33 | Re: ER Diagram design tools (Linux) |
Previous Message | Thomas Kellerer | 2008-03-07 19:59:42 | Re: ER Diagram design tools (Linux) |