Re: wire protocol errors on Debian (py3/psyco 2.8) - Mailing list psycopg

From Daniele Varrazzo
Subject Re: wire protocol errors on Debian (py3/psyco 2.8)
Date
Msg-id CA+mi_8Z0f=_bdBci2KtwMUbuKCoDiHQnR72pvYzF5tx1=PSB1g@mail.gmail.com
Whole thread Raw
In response to wire protocol errors on Debian (py3/psyco 2.8)  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Responses Re: wire protocol errors on Debian (py3/psyco 2.8)  (Adrian Klaver <adrian.klaver@aklaver.com>)
List psycopg


On Sun, 15 Mar 2020, 04:34 Karsten Hilbert, <Karsten.Hilbert@gmx.net> wrote:
Hi all,

we have two reports for psycopg2 2.8 under Python 3 on Debian
showing a problem with the wire protocol (full logs appended):

 psycopg2.OperationalError: datos insuficientes en el mensaje «T»

or

 psycopg2.DatabaseError: el contenido del mensaje no concuerda con el largo, en el mensaje tipo «C»

The error happens at different times when running the same
code. The  versions involved:

 psycopg2 module version: 2.8.4 (dt dec pq3 ext lo64)
...
  libpq version (loaded now) : 120002
...
We don't yet know the exact version of PostgreSQL this is
running against but it is likely 12.2-1+b1 from
Debian/Unstable.

Any ideas or hints what to look at next ?

The error comes from the libpq failing to parse messages from the server (at a glance CommandComplete and RowDescription - see https://www.postgresql.org/docs/current/protocol-message-formats.html) which are probably just the most common ones.

I doubt it's a bug with libpq 12.2 or whatever server is on the other side of the wire: we would have seen this error more often. If you want to investigate in that direction you may ask core devs if there have been changes in that area for those versions.

My wild guess is either faulty network or faulty memory on the machine, most likely the latter.

-- Daniele 

psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: wire protocol errors on Debian (py3/psyco 2.8)
Next
From: Adrian Klaver
Date:
Subject: Re: wire protocol errors on Debian (py3/psyco 2.8)