Re: Wierd error message - Mailing list pgsql-general

From Alex Turner
Subject Re: Wierd error message
Date
Msg-id 33c6269f05031520582e796b46@mail.gmail.com
Whole thread Raw
In response to Re: Wierd error message  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
I'm running apache 2.0.52 on pentium III 866 using RedHat EL3 - kernel
2.4.21-27.0.2.EL  I'm using mod_python 3.1.3 and the
postgresql-python-8.0.1-1PGDG RPM.

Unfortunately the error is not readibly reproducable.  Sometimes it
happens, and sometimes it doesn't.  Normaly if I reload the page it
goes away.  There are cron jobs that make HTTP calls to the system
every 5 minutes also written in python.  When httpd is isdle "lsof |
grep httpd | grep 5432" shows nothing.

We have only been experiencing this error recently.  It may just be
conincidence, but it has been noticed since upgrading to 8.0.

much to my amazement, error_log contains:
[Wed Mar 16 00:38:41 2005] [error] [client 66.216.147.134]
PythonHandler ContentGenerator: STDERR Contained data: Exception
pg.InternalError: 'Connection already closed' in <bound method
PostgresqlDBConnection.__del__ of <PGDBC.PostgresqlDBConnection
instance at 0x8b3428c>> ignored\n, referer:
http://www.totalleads.com/client_administration/display_employee_postal_code_list.nece?eid=13071§ion=users

The STDERR part I can explain: my web page evals and calls some python code.

I think I know the problem.  The current release is printing an error
to stderr if a database connection that is aready closed is tried to
be closed again.  I am catching anything on stderr and raising it as
an exception.

So I think the problem is solved.

Alex Turner
netEconomist

On Tue, 15 Mar 2005 11:13:56 -0700, Michael Fuhr <mike@fuhr.org> wrote:
> On Tue, Mar 15, 2005 at 07:32:43AM -0500, Alex Turner wrote:
>
> > I'm working with mod_python and pygresql (although I get virtualy the
> > same error with psycopg too)
>
> What's the exact error you get with psycopg?
>
> > Anyone know what the following error actualy means:
> >
> > Exception pg.InternalError: 'Connection already closed' in > ignored
> >
> > Does it mean the obvious: Some code tries to access a connection
> > object that was already closed?
>
> That would be my guess.  What are you doing that results in the
> error?  Is it easily repeatable?  Does anything else show up in the
> web server or database logs?
>
> > but why the "in > ignored" then?
>
> Can you tell us more about the setup?  What are all the pieces
> involved and their versions?
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems building postgresql 8.0.1 on OS X 10.3.8
Next
From: Fred Blaise
Date:
Subject: Re: pg/plsql question