From: vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
To: PostGre SQL Mailing List <pgsql-admin@postgresql.org>
Subject: Connect Failed error
Date: Tue, 9 Jan 2001 17:13:39 +0530
Message-ID: <001b01c07a31$694b42a0$2a14a8c0@wipro.com> (raw)
Hi all,
I have developed an application using PostGreSQL in the backend. The
application is to simulate some Network elements which should communicate
with some other application (Which is actually a Black Box for us). There is
always one instance of that application with each instance of Network
Element I simulate in my application.
That application will send different type of requests to my application, and
my application will respond to those requests by querying to the database.
The frequency of such requests are very high (maybe 4-5 requests per
second). Each request will be serviced in a "separate thread".
My interface to the database is executeQuery() and executeUpdate() type. The
connection object is local to the implementation of executeQuery() and
executeUpdate(). The connection object is made local to avoid
synchronization problems. (I am using C language). These methods are
connecting to database each time they are being called, and then after
finishing query, they close the database connection.
I am using PQsetdb() for connecting to the database and
PQfinish(DatabaseConnection db) to close database connection.
The application runs fine with as many as 50 instances of Network Elements
with a very high rate of message coming from 50 corresponding "Black Box
applications". But it will stop after some hours of continous run (max 16
hours). error :
"Connection to database failed"
I want the application to run forever. Please tell me what to do.
Platform : HP-UX 11.0
Language : C, Motif X-Windows Programming
Database : PostGreSQL 7.0.2
Thanks,
Vijay
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: vijayendra.agrawal@wipro.com
Subject: Re: Connect Failed error
In-Reply-To: <001b01c07a31$694b42a0$2a14a8c0@wipro.com>
References: <001b01c07a31$694b42a0$2a14a8c0@wipro.com>
* 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