Re: invalid message format and I/O error while comunicating with backend

From: Sergi Vera <svera(at)emovilia(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: invalid message format and I/O error while comunicating with backend
Date: 2008-04-14 08:04:57
Message-ID: 48031029.2090409@emovilia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Adding more logs doesn't give any more clue:

(...)

LOG: sentencia: EXECUTE unnamed [PREPARE: COMMIT]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: BEGIN]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: SELECT * FROM loctest.posicion, loctest.datosensor WHERE id_activo = $1 AND posicion.idposicion = datosensor.idposicion AND idsensor = 2 ORDER BY time DESC LIMIT 1]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: SELECT * FROM loctest.posicion, loctest.datosensor WHERE id_activo = $1 AND posicion.idposicion = datosensor.idposicion AND idsensor = 2 ORDER BY time DESC LIMIT 1]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: SELECT * FROM loctest.pois]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: SELECT * FROM loctest.pois]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: SELECT current FROM loctest.id_pos_seq_view]

LOG: sentencia: BIND

LOG: sentencia: EXECUTE unnamed [PREPARE: SELECT current FROM loctest.id_pos_seq_view]

LOG: sentencia: BIND

ERROR: message format invalid

FATAL: message type of frontend 0 is not valid

Besides this unnamed that appears on the sentences not much more info is shown on the logs.

Sometimes the number associated whith the fronted changes Sometimes it's 0 sometimes it's 255..

Regards

Sergi Vera escribió:

Thanks Craig,

Browsing the pgsql logs I've found the following error messages (roughly translated to english):

(autovacuums)

...

(autovacuums)

ERROR: remaining data on the message is not sufficient

FATAL: message type from the frontend 0 is not valid

I just don't understand why sometimes it fails and sometimes not.

I will try the other suggestion you made as soon as possible

Craig Ringer escribió:


Sergi Vera wrote:



Everything is working ok and fast, but at some moment (sometimes sooner,

sometimes later) the server starts to fail with the following messages

org.postgresql.util.PSQLException: invalid message format (for the first

failure)

org.postgresql.util.PSQLException: A I/O error has happened while

sending to backend (at every following jdbc call)


I suggest having a look in the server logs to see if there is any error

being reported by the backend.

You might also find it helpful to enable log_statement and

log_connection in postgresql.conf while you're trying to track the issue

down. Your logs might get quite big if your load is high, though.

--

Craig Ringer


--




/*<![CDATA[*/
<!--
@page { size: 21cm 29.7cm; margin: 2cm }
P { margin-bottom: 0.21cm }
-->
/*]]>*/

Sergio Vera

Rosellón, 34, 5 Planta

08029 Barcelona

tel. 902101870

www.emovilia.com


IMPRIME ESTE EMAIL Y SUS ARCHIVOS SI REALMENTE LOS NECESITAS.

GRACIAS POR RESPETAR EL MEDIO AMBIENTE.

NOTA: La información contenida en este email, y sus documentos adjuntos, es confidencial y para uso exclusivo de la persona o personas a las que va dirigido. No está permitido el acceso a este mensaje a otra persona distinta a los indicados. Si no es uno de los destinatarios o ha recibido este mensaje por error, cualquier duplicación, reproducción, distribución, así como cualquier uso de la información contenida o cualquiera otra acción tomada en relación con el mismo, está prohibida y puede ser ilegal.

ADVICE: The information in this email as in the attachments is confidential and private for exclusive use of the target user group. Access to this message is disallowed to any other than the addressee. If you are not the addressee or you have been included by mistake, any duplication, reproduction, distribution as any other action relative to this email is strictly forbidden and might be illegal.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Stanislav Mironov 2008-04-14 09:18:51 Re: Two BLOBs (OID) in table?
Previous Message Sergi Vera 2008-04-14 07:43:06 Re: invalid message format and I/O error while comunicating with backend