Received: from wiprom2mx1.wipro.com (wiprom2mx1.wipro.com [203.197.164.41]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f09Be4B07143 for ; Tue, 9 Jan 2001 06:40:06 -0500 (EST) (envelope-from vijayendra.agrawal@wipro.com) Received: from m2vwall2.wipro.com (m2vwall2.wipro.com [164.164.27.52]) by wiprom2mx1.wipro.com (8.9.3+Sun/8.9.3) with SMTP id RAA13908 for ; Tue, 9 Jan 2001 17:17:10 GMT Received: from vijayendra ([192.168.20.42]) by sarovar.mail.wipro.com (Netscape Messaging Server 3.6) with ESMTP id AAA41E2; Tue, 9 Jan 2001 17:07:18 +0530 Reply-To: From: "vijayendra mohan agrawal" To: "PostGre SQL Mailing List" Subject: Connect Failed error Date: Tue, 9 Jan 2001 17:13:39 +0530 Message-ID: <001b01c07a31$694b42a0$2a14a8c0@wipro.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0017_01C07A5F.82D8C520" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200101/39 X-Sequence-Number: 410 This is a multi-part message in MIME format. ------=_NextPart_000_0017_01C07A5F.82D8C520 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0017_01C07A5F.82D8C520 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi=20 all,
 
I have de= veloped an=20 application using PostGreSQL in the backend. The application is to simulate so= me=20 Network elements which should communicate with some other application (Whic= h is=20 actually a Black Box for us). There is always one instance of that applicat= ion=20 with each instance of Network Element I simulate in my=20 application.
 
That appl= ication=20 will send different type of requests to my application, and my application = will=20 respond to those requests by querying to the database. The frequency of suc= h=20 requests are very high (maybe 4-5 requests per second). Each request will b= e=20 serviced in a "separate thread".
 
My interf= ace to the=20 database is executeQuery() and executeUpdate() type. The connection object = is=20 local to the implementation of executeQuery() and executeUpdate(). The=20 connection object is made local to avoid synchronization problems. (I am us= ing C=20 language). These methods are connecting to database each time they are bein= g=20 called, and then after finishing query, they close the database=20 connection.
 
I= am using=20 PQsetdb() for connecting to the database and PQfinish(DatabaseConnection db= ) to=20 close database connection.
 
The appli= cation runs=20 fine with as many as 50 instances of Network Elements with a very high rate= of=20 message coming from 50 corresponding "Black Box applications". But it will = stop=20 after some hours of continous run (max 16 hours). error :
"Connection to database=20 failed"
 
I want th= e=20 application to run forever. Please tell me what to do.
 
Platform = : HP-UX=20 11.0
Language = : C, Motif=20 X-Windows Programming
Database = :=20 PostGreSQL 7.0.2
 
Thanks,
Vijay
------=_NextPart_000_0017_01C07A5F.82D8C520--