Re: after postgres upgrade - ERROR: current transaction

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Abdul-Wahid Paterson <aw(at)lintrix(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: after postgres upgrade - ERROR: current transaction
Date: 2003-09-15 18:48:21
Message-ID: 1063651701.21281.54.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

While I would recommend you upgrade your php to be built against 7.3,
before that you can use one of the new 7.3 error messages to find out
where things are going awry. in your postgresql.conf set
log_min_error_statement = error. this will cause the offending sql
statement to be written to your logs, with this you can narrow down
where in your web code your problems are being created, and better
attack the problem at that point.

Robert Treat

On Mon, 2003-09-15 at 14:18, Abdul-Wahid Paterson wrote:
> Hi,
>
> I have had a site working for the last 2 years and have had no problems
> until at the weekend I replace my database server with a newer one. The
> database migration went like a dream and I had the whole db changed over
> in 1 hour.
>
> Since the upgrade I have been getting the following error message
> sporadically.
>
> ERROR: current transaction is aborted, queries ignored until end of
> transaction block
>
>
> I have the following setup
>
> Webserver:
> Apache 1.3.27 (Redhat 7.2)
> PHP 4.1.2
>
> Database server (old): Postgres 7.1.3
> Database server (new): Postgres 7.3.4
>
> The PHP scripts have not changed. I am using PEAR::DB for database
> access. I think it is the PEAR::DB that is actually making the
> transactions because some times the error message some times gets
> generated when I don't even have a transaction. Not too sure about that
> though.
>
> The funny thing is, when I first start up the web-server I don't get any
> error messages and the site carries on working fine just as it did when
> using the old database server.
>
> However, after about an hour. I suddenly get 10 errors a minute from my
> site (average of course) with the majority of pages still accessing
> fine. After a bit more time, this doubles to 20 errors a minute. If I
> carry on leaving the site, I eventually get error messages every second.
> The error message seem to be generated from completely unrelated bits of
> my code.
>
> When I restart Apache the error messages go away and the site functions
> as normal.
>
> My theory is, since I am using persistent connections in PHP, a
> connection is some how becoming...unstable...for the want of a better
> word. That connection then returns an error on every single request.
>
> To put my theory to test, I have turned off the persistent connections
> on my site and everything appears to be working fine now. I now need to
> work out where to go from here as my server load is high and I would
> prefer to use persistent connections.
>
> Has anyone experienced any similar problems with changing Postgres
> versions? Do I need to upgrade my PHP on the web-server as the RedHat
> postgres the PHP was built against was Postgres 7.1.3? Anyone have any
> suggestions on how I can fix this?
>
> Regards,
>
> --
> Abdul-Wahid Paterson
>
> Lintrix Networking & Comms. ltd. Web: http://www.lintrix.net/
> Tel: +44 (0) 870 285 4703 Mobile: +44 (0)7971 506177
> Fax: 0870 133 0433 Email/Jabber: aw(at)lintrix(dot)net
> --------------------------------------------------------------------
> Web-Hosting | Development | Security | Consultancy | Domains
> --------------------------------------------------------------------

--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2003-09-15 18:50:25 Re: Mirrors
Previous Message Holger Marzen 2003-09-15 18:46:29 Re: after postgres upgrade - ERROR: current transaction