[Catalog-sig] psycoph errors from pypi

Jim Fulton jim at zope.com
Sat Jul 7 00:06:29 CEST 2007


On Jul 6, 2007, at 6:02 PM, Martin v. Löwis wrote:

>>> I now do, somewhat. Apparently, when you discard a cursor object
>>> in psycopg, and create a new one, that doesn't necessarily start
>>> a new transaction. So if there was some SQL error in the connection,
>>> it stops accepting further SQL statements.
>>>
>>> I fixed that by rolling back the connection after each request,
>>> and before each new request.
>>>
>>> What I don't understand is why there was an error in the first
>>> place (or what that error was).
>>
>> OK, this probably isn't helpful, but I can't help asking an obvious
>> question.  Did something change in the software other than a  
>> switch from
>> mod_python to FastCGI?
>
> Yes, I also made the connections to Postgres persistent, rather than
> opening a new connection on each request.

Ah, OK, that explains it.  This is a reasonable thing to do from a  
performance point of view.  Thanks for plugging away at this. :)

(Of course it's too bad we don't have a better way of testing  
changes. Oh well.)

Jim

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the Catalog-SIG mailing list