[Lazarus] PostgreSql: unexpected EOF on client connection with an open transaction

Michael Van Canneyt michael at freepascal.org
Wed Sep 2 21:00:26 CEST 2015

On Wed, 2 Sep 2015, Leonardo M. Ramé wrote:

> El 02/09/15 a las 15:09, Michael Van Canneyt escribió:
>> On Wed, 2 Sep 2015, Leonardo M. Ramé wrote:
>>>> Do you have a second transaction object (e.g. default transaction) ?
>>>> If so, that's probably it.
>>>> Michael.
> Yes, I added an onDestroy event to the datamodule containing the PQConnection 
> object and called PQConnection.Close(), but the efect is the same. BTW, the 
> onCreate event is who calls PQConnection.Connect := True.
> There must be a problem in the CGI, because I created a desktop app with just 
> a PQConnection, SQLTransaction and SQLQuery and the message isn't logged on 
> the server's log.

Well, that is why I asked how it is closed. 
Maybe it was closed a different way in your CGI, without properly closing it.
The strange thing is that it reports an active transaction.

Do you open a dataset ? If so, try setting Unidirectional:=True before opening it.
(this avoids extra queries to fetch unique key data etc.)


More information about the Lazarus mailing list