Re: [psycopg] Problem with ZPsycopgDA’s pool - Mailing list psycopg

From Daniele Varrazzo
Subject Re: [psycopg] Problem with ZPsycopgDA’s pool
Date
Msg-id CA+mi_8Y9Jrc_Ho8ehos2at=-1-Pt6ybvMqfmaeski-vLgCSyAA@mail.gmail.com
Whole thread Raw
In response to Problem with ZPsycopgDA’s pool  (Nicolas Boullis <postgresql@ilcode.fr>)
Responses Re: Problem with ZPsycopgDA’s pool  (Nicolas Boullis <postgresql@ilcode.fr>)
List psycopg
On Wed, Apr 16, 2014 at 3:04 PM, Nicolas Boullis <postgresql@ilcode.fr> wrote:
> Hi,
>
> I know that Zope support was dropped from psycopg2 but, as far as I can
> see on
>   https://pypi.python.org/pypi/ZPsycopgDA/2.4.6
> this list is still referenced for ZPsycopgDA.
>
> Please tell me if this list is not the right place for questions about
> ZPsycopgDA (and even better, please tell me if you know a better place
> for such questions).

Yes, this is the right place

> I’m in the process of switching some applications from very old Zope
> (version 2.6) with very old psycopg (version 1.1.10) and ZPsycopgDA to
> much newer Zope, psycopg2 and ZPsycopgDA.
>
> Unfortunately, I have experienced some failures which looked somewhat
> random. After much investigation, the problem seems to occur when 2
> clients request a page (that issues SQL requests) simultaneously. Then,
> all (or most) clients get failures for a few hours.
>
> My understading is that the second client that requests the page before
> the first was served gets a connection from the pool that was not
> initialized. Because of that, the character encoding is not as expected,
> and data of type datetime is not converted to the right type, leading to
> errors in the application.
>
> Is that a known issue? I may try to patch this if needed.

I think it is a known issue. Could be a manifestation of this bug:
http://psycopg.lighthouseapp.com/projects/62710/tickets/155

Patches are very welcome: I don't get the Zope model at all and I
can't assess if we have ever changed the behaviour on course or if
this issue has ever existed.

Tests are welcome too, as well as somebody who cares enough about zope
to maintain the adapter.

Thank you very much.

-- Daniele


psycopg by date:

Previous
From: Nicolas Boullis
Date:
Subject: Problem with ZPsycopgDA’s pool
Next
From: Nicolas Boullis
Date:
Subject: Re: Problem with ZPsycopgDA’s pool