Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BDAA9633051 for ; Wed, 10 Jun 2009 08:16:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 75808-06 for ; Wed, 10 Jun 2009 08:16:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fafnir.androme.com (fafnir.androme.com [62.58.96.158]) by mail.postgresql.org (Postfix) with ESMTP id A80D36329CF for ; Wed, 10 Jun 2009 08:16:42 -0300 (ADT) Received: by fafnir.androme.com (Postfix, from userid 1003) id C31E6B962C6; Wed, 10 Jun 2009 13:16:40 +0200 (CEST) Message-ID: <4A2F9617.7080605@androme.es> Date: Wed, 10 Jun 2009 13:16:39 +0200 From: Ramon Poca User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Random crashes on getConnection References: <4A2F920C.2090204@androme.es> In-Reply-To: <4A2F920C.2090204@androme.es> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/47 X-Sequence-Number: 19711 And in a quick reply to myself: PGPOOL The damn thing was installed on postgres port, and when reused a connection from a php client (using LATIN9), broke the whole thing. Please, someone add this to the documentation/FAQ/whatever. Ramon Poca escribió: > I've traced the crash to: > > org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(PGStream, > ProtocolConnectionImpl, Logger) line: 470 > > For some reason, client_encoding gets changed back and forth from > UNICODE to LATIN9. When it's LATIN9, it causes the exception. > > In my connection URL/parameters I do not force any encoding. LATIN9 is > the encoding the database is set to. What can be causing this switch? > > (Message that caused the exception: beresp = 83 (E), > client_encoding=LATIN9) > > > Any ideas? > > > ----------- > >I get random exceptions on GetConnection() on a Quartz-based job. > >Sometimes everything works, and sometimes I get a "Protocol Error. > >Session setup failed". Does anybody know what might be happening? > > >Client: Both postgresql-8.3-604.jdbc4.jar and > >postgresql-8.4dev-700.jdbc4.jar. > >Server: Postgres 8.1. The databases are stored in LATIN9 encoding. > >JVM: java-6-sun-1.6.0.12 > > >SEVERE: com.androme.phemium.statistics.EligibleCustomerList@3b1d04 > >org.postgresql.util.PSQLException: Protocol error. Session setup > >failed. > > at > >org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:481) > > > at > >org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:101) > > > at -- *Ramon Poca* ramon.poca@androme.es