Re: Random UnknownHostExceptions

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: George Woodring <george(dot)woodring(at)iglass(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Random UnknownHostExceptions
Date: 2012-06-28 16:02:32
Message-ID: m3obo3tofb.fsf@mnc.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

George Woodring <george.woodring 'at' iglass.net> writes:

> Caused by: java.net.UnknownHostException: iprobe113
>
>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
>        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>        at java.net.Socket.connect(Socket.java:529)
>        at java.net.Socket.connect(Socket.java:478)
>        at java.net.Socket.<init>(Socket.java:375)
>        at java.net.Socket.<init>(Socket.java:189)
>        at org.postgresql.core.PGStream.<init>(PGStream.java:62)

The PG driver seems to be using the standard Socket java
interface, so there's little chance it has anything to do with
it. I would try to run a local Java program using a Socket object
to connect to a fake port on the same machine, for example you
could base on network connection code from:

http://code.google.com/p/androidnetworktester/source/browse/trunk/src/org/gc/networktester/tester/TcpConnectionTester.java

Btw, one per 100K connections means you keep on creating new
connections. This usually has very poor performance. You should
use a connection pool.

--
Guillaume Cottenceau

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kiran Kulkarni 2012-06-28 16:15:24 Re: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend
Previous Message Dave Cramer 2012-06-28 15:38:56 Re: Random UnknownHostExceptions