From vijayendra.agrawal@wipro.com Tue Jan 9 11:40:06 2001 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-- From tgl@sss.pgh.pa.us Tue Jan 9 17:54:10 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f09HsAB34543 for ; Tue, 9 Jan 2001 12:54:10 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f09HrDJ01627; Tue, 9 Jan 2001 12:53:14 -0500 (EST) To: vijayendra.agrawal@wipro.com cc: "PostGre SQL Mailing List" Subject: Re: Connect Failed error In-reply-to: <001b01c07a31$694b42a0$2a14a8c0@wipro.com> References: <001b01c07a31$694b42a0$2a14a8c0@wipro.com> Comments: In-reply-to "vijayendra mohan agrawal" message dated "Tue, 09 Jan 2001 17:13:39 +0530" Date: Tue, 09 Jan 2001 12:53:13 -0500 Message-ID: <1624.979062793@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200101/41 X-Sequence-Number: 412 "vijayendra mohan agrawal" writes: > 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" This isn't enough info to troubleshoot your problem. *Why* is that error coming out? If your application isn't willing to provide more info, try looking in the postmaster's stdout/stderr log for error messages. (You are keeping such a log, I hope, and not using -S or sending the messages to /dev/null.) regards, tom lane From vijayendra.agrawal@wipro.com Wed Jan 10 06:44:34 2001 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 f0A6iPB88673 for ; Wed, 10 Jan 2001 01:44:34 -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 MAA14020 for ; Wed, 10 Jan 2001 12:21:41 GMT Received: from vijayendra ([192.168.20.42]) by sarovar.mail.wipro.com (Netscape Messaging Server 3.6) with ESMTP id AAA68D5; Wed, 10 Jan 2001 12:11:39 +0530 Reply-To: From: "vijayendra mohan agrawal" To: "Tom Lane" Cc: "PostGre SQL Mailing List" Subject: RE: Connect Failed error Date: Wed, 10 Jan 2001 12:17:40 +0530 Message-ID: <000601c07ad1$3a6ab880$2a14a8c0@wipro.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <1624.979062793@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200101/42 X-Sequence-Number: 413 Hi, I am getting the following errors : FATAL 1: Memory exhausted in AllocSetAlloc() pq_recvbuf: unexpected EOF on client connection or sometimes... pq_flush: send() failed: Broken pipe For ending a connection, I am using PQfinish(database_connection con) Any inform will be helpfull... Vijay -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Tuesday, January 09, 2001 11:23 PM To: vijayendra.agrawal@wipro.com Cc: PostGre SQL Mailing List Subject: Re: Connect Failed error "vijayendra mohan agrawal" writes: > 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" This isn't enough info to troubleshoot your problem. *Why* is that error coming out? If your application isn't willing to provide more info, try looking in the postmaster's stdout/stderr log for error messages. (You are keeping such a log, I hope, and not using -S or sending the messages to /dev/null.) regards, tom lane