Poul Møller Hansen <freebsd@pbnet.dk> writes:
> I have a problem with slow connects to a database server.
>
> In a little Java application I am starting 100 threads, each one making
> a database connection. The program is running on my laptop.
>
> When connecting to one server (AMD Opteron 2GHz with Solaris &
> pgsql version 8.0.3) the 100 connections takes 455 seconds!
Is it possible that you've got DNS timeouts happening or something
like that? Though I don't think PG does reverse DNS lookups,
especially not by default.
Watching the connection process with 'tcpdump' to see where the stall
happens might be informative.
-Doug