Re: postgresql failed to establish a connection to <pg server name>

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <saa(at)klinkhammer(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: postgresql failed to establish a connection to <pg server name>
Date: 2012-02-05 15:26:24
Message-ID: 4F2E4B400200002500044DF0@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Al-Salami, Adel" wrote:

> am using Npgsql .net using VB.NET and trying to make a stress test
> about the connections ammount, trying to open about 200 sessions
> from a client Windows7 PC.

What is your setting of max_connections?

Unless your server has 100 cores, you should probably consider a
connection pool which accepts the number of active clients you want
to support, and routes that to a small pool of actual database
connections.

> Randomly I get an error message in my vb.net from the npgsql saying
> that "postgresql failed to establish a connection to < pg server
> name >" that happen for about 10 percent of the connections
> randomly, meanwhile on the server itself I found errors like:
>
> EOF on Client-Connection
> No connection could be made because the target machine actively
> refused it.

Can you copy/paste exact lines from the PostgreSQL log?

You didn't say anything about the version of PostgreSQL, its
configuration, or the server OS. Please read this before posting a
follow-up, to get ideas of what information might be useful to people
trying to help you:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

It can be particularly useful to include a self-contained test case
using software that others are likely to have available. If you can
script something using psql to make the connections which shows the
problem, you can probably get an authoritative answer very quickly.

-Kevin

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2012-02-05 22:13:06 Re: Postgres community version limitaiton - help needed
Previous Message Scott Ribe 2012-02-05 15:18:20 Re: Starting postgres server on mac os x 10.6.8