Applicationl Crash - Connection reset by peer !!!

Поиск
Список
Период
Сортировка
Искать

Applicationl Crash - Connection reset by peer !!!

От:
"Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar.Pyatalo@honeywell.com>
Дата:

Hi,

I am using Postgresql 7.4.3 running on RedHat Linux 2.4.7. My Application is
coded in C. I am using libpq functions inorder to connect to the database. 
I am using PQsetdbLogin() to connect and PQfinish() to release the database
connection. In my application I have around 15-20 C functions. In each
function i connect to the database, perform some query and then release the
connection. Today the application is crashing. It says SEGMENTATION FAULT in
PQsetdbLogin().
In the LOG, I see -
LOG: could not receive data from client: broken pipe
LOG: connection reset by peer
LOG: unexpected EOF on client connection.

any inputs on this most welcome.
Thanks in advance.
> With Best Regards 
> Pradeep Kumar P J 
> 

Re: [NOVICE] Applicationl Crash - Connection reset by peer !!!

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Pradeepkumar, Pyatalo (IE10)"  writes:
> I am using Postgresql 7.4.3 running on RedHat Linux 2.4.7. My Application is
> coded in C. I am using libpq functions inorder to connect to the database. 
> I am using PQsetdbLogin() to connect and PQfinish() to release the database
> connection. In my application I have around 15-20 C functions. In each
> function i connect to the database, perform some query and then release the
> connection. Today the application is crashing. It says SEGMENTATION FAULT in
> PQsetdbLogin().

The odds are *extremely* high that this is a bug in your own code, not
in libpq.  PQsetdbLogin() is probably just the victim of a memory stomp
occurring elsewhere.

			regards, tom lane
FAQ