dbTalk Databases Forums  

ABRUPT CLOSURE OF POSTGRESQL SOCKET

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss ABRUPT CLOSURE OF POSTGRESQL SOCKET in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Deepa K
 
Posts: n/a

Default ABRUPT CLOSURE OF POSTGRESQL SOCKET - 10-27-2004 , 10:22 AM






Hi,
I am running postgresql 7.1.3 in RedHat Linux 7.2. From an
external C application, three connections are established with
postmaster (it
is started with -i option) through unix sockets. Two times I received
EPIPE error when trying to send a query to postmaster. This is because of
the abrupt closure of pgsql backend.

The query sent is formed dynamically and hence I'm unable to get
the query whose processing may have led to such abrupt closure. But
this application is working for 2 years till now without any such
problems. So I don't really suspect the query.

The postgresql todo lists that usage of views can lead to
such abrupt closure. But there are no views used in my application.
The another possbile reason for abnormal closure that I understand
is if the hard disk is full. But this is also not the case.

Pgsql log shows the following message :
=====================================

DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
NOTICE: RelationBuildDesc: can't open pg_trigger: Too many open files in
system
pq_recvbuf: unexpected EOF on client connection
DEBUG: proc_exit(0)
DEBUG: shmem_exit(0)
DEBUG: exit(0)
/usr/bin/postmaster: reaping dead processes...
/usr/bin/postmaster: CleanupProc: pid 28312 exited with status 11
Server process (pid 28312) exited with status 11 at Wed Oct 27 17:00:02 2004
Terminating any active server processes...
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28250
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28248
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28204
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28162
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 20173
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 20171
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 20170
/usr/bin/postmaster: CleanupProc: pid 28162 exited with status 0
/usr/bin/postmaster: reaping dead processes...
/usr/bin/postmaster: ServerLoop: handling reading 5
/usr/bin/postmaster: ServerLoop: handling reading 5
NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died
abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to
terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
/usr/bin/postmaster: reaping dead processes...

Coming to the question,
======================

a. What could be the reason for abnormal closure of postmaster
socket?
b. How can the application detect such a abnormal closure of
socket?

--
regards,
Deepa K

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: ABRUPT CLOSURE OF POSTGRESQL SOCKET - 10-27-2004 , 11:27 AM






"Deepa K" <kdeepa (AT) midascomm (DOT) com> writes:
Quote:
I am running postgresql 7.1.3 in RedHat Linux 7.2.
You do realize that both your database and your OS are ancient versions
with many known bugs?

Quote:
NOTICE: RelationBuildDesc: can't open pg_trigger: Too many open files in
system
I think this is probably the source of the core dump --- the code
probably isn't prepared to recover from that. You'll need to increase
the kernel limit on number of open files. In recent PG versions you
could alternatively decrease max_files_per_process, but I'm pretty sure
7.1 did not have that setting ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.