← Back to team overview

fuel-dev team mailing list archive

Re: DatabaseError: (DatabaseError) error with no message from the libpq

 

Hello Nikolay,

We have already enforce session.remove() in 'finally' section of 'try'
block. Such try-finally is implemented as decorator. load_db_driver() was
decorated and also wrapped other places: Watcher thread and Receiver
process. That reduced amount of such libpq exceptions but not completely.
Some times, especially when RAM is low, these exceptions "returns".

Also web.ctx was used as a session objects storage before. We've redesign
it to use scoped_session factory everywhere in the code. However such
exceptions are still there.

SQLAlchemy was updated, PostgreSQL was also updated. Now I'll try to
rebuild psycopg2.


On Fri, Apr 4, 2014 at 4:46 PM, Nikolay Markov <nmarkov@xxxxxxxxxxxx> wrote:

> Hello Aleksey,
>
> I did some research and found that this problem might be connected with
> the way SQLAlchemy works with it's connections, leaving some of them open
> which causes this error. So, you can try explicit session closing
> (session.close() or even session.remove()) at the end of each request (look
> at load_db_driver() method). Updating SQLAlchemy and psycopg2 might work,
> as well.
>
>
> On Fri, Apr 4, 2014 at 3:40 PM, Aleksey Kutepov <kutepoff@xxxxxxxxx>wrote:
>
>>
>> Hi all,
>>
>> Our team working with FUELWEB code which was forked more than a year ago.
>> The problem is that psycopg2 raises "DatabaseError: (DatabaseError) error
>> with no message from the libpq"
>> And we cannot find the root cause. This happens in Receiver thread only
>> at the first DB query in a method. It occurs sporadically without any
>> "pattern".
>>
>> If anybody faced such problems we would appreciate any support.
>>
>> Best regards,
>> Aleksey
>>
>>
>> --
>> Mailing list: https://launchpad.net/~fuel-dev
>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~fuel-dev
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Best regards,
> Nick Markov
>

References