From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: saa@klinkhammer.com
To: pgsql-admin@postgresql.org
Subject: Re: postgresql failed to establish a connection to <pg server name>
Date: Sun, 05 Feb 2012 09:26:24 -0600
Message-ID: <4F2E4B400200002500044DF0@gw.wicourts.gov> (raw)
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, saa@klinkhammer.com
Subject: Re: postgresql failed to establish a connection to <pg server name>
In-Reply-To: <4F2E4B400200002500044DF0@gw.wicourts.gov>
References: <4F2E4B400200002500044DF0@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox