Re: What the heck is happening here?

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Paul Tomblin <ptomblin(at)xcski(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What the heck is happening here?
Date: 2001-06-11 22:15:16
Message-ID: Pine.BSO.4.10.10106111813310.232-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 11 Jun 2001, Paul Tomblin wrote:

> Quoting Alex Pilosov (alex(at)pilosoft(dot)com):
> > In mod_perl case, make sure that your stuff does not try to establish
> > connections on startup, and only does that (using ApacheDBI to cache
> > connections) when the page is requested.
>
> Oh oh. I *am* doing that - I make a connection to grab some stuff right
> at start up, and keep that $conn for all the pages. Is there a good
> example of using ApacheDBI to cache connections using Pg.pm I can look at?

Don't do it. If you _must_ get some stuff on startup, close the conn after
you are done. See mod_perl references for examples on using of ApacheDBI
(mostly its just 'use ApacheDBI' vs 'use DBI') and no, you cannot use Pg
(the oldstyle, libpq-alike) interface with ApacheDBI, you must use
DBD::Pg.

> > Also, it is possible that every day some script tries to rotate logs and
> > SIGHUPs the httpd. mod_perl may do strange stuff on restart. Try manually
> > sending HUP to server and see what happens.
>
> Actually, sending HUP to all the httpd processes is the only thing that
> fixes it. For a while.
-alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Tomblin 2001-06-11 22:17:31 Re: What the heck is happening here?
Previous Message Andrew W. Schmeder 2001-06-11 22:12:58 pg_dump problem...