Broken pipes

Started by mikeover 24 years ago9 messagesgeneral
Jump to latest
#1mike
matrix@quadrent.net

Recently I've been noticing a lot of odd errors in our postgres logs, that involves a great deal of broken pipes and pq_recvbuf entries. I only noticed this when tables were not being created and am not sure what exactly is going on.

this is just a small bit of what keeps popping up in my logs, and if someone could help explain whats going on would be greatly apreciated.

NOTICE: CREATE TABLE will create implicit sequence 'faq_id_seq' for SERIAL column 'faq.id'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'faq_pkey' for table 'faq'
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
pq_flush: send() failed: Broken pipe
pq_recvbuf: recv() failed: Broken pipe

Mike

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: mike (#1)
Re: Broken pipes

"mike sears" <matrix@quadrent.net> writes:

pq_recvbuf: unexpected EOF on client connection

This indicates that you have clients that are disconnecting
ungracefully, but it doesn't tell us much about why.

One recently-understood possibility is that if you are using psql
with password authentication, then psql doesn't prompt you for a
password until it's tried and failed to connect without. That
failure provokes one of these messages. (For 7.2, we've hacked the
postmaster to suppress the log message in that case.)

Otherwise you have misbehaving client-side software. I think that
the ODBC driver is known not to disconnect gracefully, but I don't
know of any other problems that would cause this, short of client
crashes.

regards, tom lane

#3mike
matrix@quadrent.net
In reply to: mike (#1)
Re: Broken pipes

I dunno if this makes any differnec or not, but we use php to interface w/
postgress. Could this also have anything to do with this problem?

as well would this surpression be in the current snapshots?

Mike

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "mike sears" <matrix@quadrent.net>
Cc: <pgsql-general@postgresql.org>
Sent: 26 October, 2001 7:30 PM
Subject: Re: Broken pipes

Show quoted text

"mike sears" <matrix@quadrent.net> writes:

pq_recvbuf: unexpected EOF on client connection

This indicates that you have clients that are disconnecting
ungracefully, but it doesn't tell us much about why.

One recently-understood possibility is that if you are using psql
with password authentication, then psql doesn't prompt you for a
password until it's tried and failed to connect without. That
failure provokes one of these messages. (For 7.2, we've hacked the
postmaster to suppress the log message in that case.)

Otherwise you have misbehaving client-side software. I think that
the ODBC driver is known not to disconnect gracefully, but I don't
know of any other problems that would cause this, short of client
crashes.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#4Keary Suska
hierophant@pcisys.net
In reply to: mike (#3)
Re: Broken pipes

I had experienced these errors in PHP with large selects (from a web
perspective--maybe a few thousand rows). It may have to do with the memory
limit imposed on PHP (se php.ini file). The symptom on the client end is
that the page seem to try to load until a timeout would be expected but then
it just quits.

You questions you want to ask yourself: 1) Are there any selects returning
rows larger than can be practically handled in a web browser? 2) have you
tried increasing the memory limit of PHP?

In my case, the solution was correcting my SQL statement where a syntactical
ambiguity was causing a cross join to occur.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Show quoted text

From: "mike sears" <matrix@quadrent.net>
Date: Sat, 27 Oct 2001 01:01:07 -0400
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: <pgsql-general@postgresql.org>
Subject: Re: [GENERAL] Broken pipes

I dunno if this makes any differnec or not, but we use php to interface w/
postgress. Could this also have anything to do with this problem?

as well would this surpression be in the current snapshots?

Mike

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "mike sears" <matrix@quadrent.net>
Cc: <pgsql-general@postgresql.org>
Sent: 26 October, 2001 7:30 PM
Subject: Re: Broken pipes

"mike sears" <matrix@quadrent.net> writes:

pq_recvbuf: unexpected EOF on client connection

This indicates that you have clients that are disconnecting
ungracefully, but it doesn't tell us much about why.

One recently-understood possibility is that if you are using psql
with password authentication, then psql doesn't prompt you for a
password until it's tried and failed to connect without. That
failure provokes one of these messages. (For 7.2, we've hacked the
postmaster to suppress the log message in that case.)

Otherwise you have misbehaving client-side software. I think that
the ODBC driver is known not to disconnect gracefully, but I don't
know of any other problems that would cause this, short of client
crashes.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#5Noname
schemy@freesurf.fr
In reply to: mike (#1)
Re: Broken pipes 2

Hello, I am using Apache 1.3.19, PHP 4.0.6 and postgres 7.1.3 .

I am embedding SQL transactions in PHP code in a "for" ;

=========================================================
for ( $i = 0 ; $i < $nbPlaces ; $i++ ) {
echo "i=$i";

$result = pg_exec( $database,"BEGIN ;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

CREATE VIEW TICKETCHERCHE as select min(NumTicket) FROM TICKET WHERE
TICKET.NumEvenement = '$numEvenement' AND TICKET.EtatPlace = '1' AND
TICKET.numticket=IDTICKET.numticket AND
IDTICKET.idgroupe=GROUPETICKET.idgroupe AND GroupeTicket.IdBatiment =
'$idBatiment' AND IDTICKET.IdGroupe = '$idGroupe' ;

INSERT INTO DETAILPANIER( numticket, numevenement, numPanier ) VALUES(
TICKETCHERCHE.MIN,'$numEvenement', '$panier' ) ;

UPDATE TICKET SET EtatPlace = '0' WHERE TICKET.NumEvenement =
'$numEvenement' AND TICKET.EtatPlace = '1' AND GROUPETICKET.IdBatiment =
'$idBatiment' AND IDTICKET.IdGroupe = '$idGroupe' AND
NUMTICKET=TICKETCHERCHE.MIN ;

DROP VIEW TICKETCHERCHE ;
COMMIT ;") ;

echo "result=$result<br>";
}
=========================================================================
but sometimes , i have errors :

pq_flush: send() failed: Connection reset by peer
NOTICE: Adding missing FROM-clause entry in subquery for table
"groupeticket"
pq_flush: send() failed: Broken pipe
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection

I would like to What are these functions first ?
Why these errors appears sometimes and not all the time ?
And when i put the same code on two diffrents PC, one works and the second
have those errors , it is very strange .

Thanks
Thierry

mike sears ���crit:

Recently I've been noticing a lot of odd errors in our postgres logs, that involves a great deal of broken pipes and pq_recvbuf entries. I only noticed this when tables were not being created and am not sure what exactly is going on.

this is just a small bit of what keeps popping up in my logs, and if someone could help explain whats going on would be greatly apreciated.

NOTICE: CREATE TABLE will create implicit sequence 'faq_id_seq' for SERIAL column 'faq.id'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'faq_pkey' for table 'faq'
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
pq_flush: send() failed: Broken pipe
pq_recvbuf: recv() failed: Broken pipe

Mike

=====================
Abbondanza Thierry
schemy@freesurf.fr
http://schemy.free.fr
=====================

#6Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Noname (#5)
Re: Broken pipes 2

Hello, I am using Apache 1.3.19, PHP 4.0.6 and postgres 7.1.3 .

I am embedding SQL transactions in PHP code in a "for" ;

PHP 4.0.6 has a bug with handling NOTICE messages. Try PHP 4.0.5 or
4.1.0 RC1.

Show quoted text

=========================================================
for ( $i = 0 ; $i < $nbPlaces ; $i++ ) {
echo "i=$i";

$result = pg_exec( $database,"BEGIN ;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

CREATE VIEW TICKETCHERCHE as select min(NumTicket) FROM TICKET WHERE
TICKET.NumEvenement = '$numEvenement' AND TICKET.EtatPlace = '1' AND
TICKET.numticket=IDTICKET.numticket AND
IDTICKET.idgroupe=GROUPETICKET.idgroupe AND GroupeTicket.IdBatiment =
'$idBatiment' AND IDTICKET.IdGroupe = '$idGroupe' ;

INSERT INTO DETAILPANIER( numticket, numevenement, numPanier ) VALUES(
TICKETCHERCHE.MIN,'$numEvenement', '$panier' ) ;

UPDATE TICKET SET EtatPlace = '0' WHERE TICKET.NumEvenement =
'$numEvenement' AND TICKET.EtatPlace = '1' AND GROUPETICKET.IdBatiment =
'$idBatiment' AND IDTICKET.IdGroupe = '$idGroupe' AND
NUMTICKET=TICKETCHERCHE.MIN ;

DROP VIEW TICKETCHERCHE ;
COMMIT ;") ;

echo "result=$result<br>";
}
=========================================================================
but sometimes , i have errors :

pq_flush: send() failed: Connection reset by peer
NOTICE: Adding missing FROM-clause entry in subquery for table
"groupeticket"
pq_flush: send() failed: Broken pipe
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection

I would like to What are these functions first ?
Why these errors appears sometimes and not all the time ?
And when i put the same code on two diffrents PC, one works and the second
have those errors , it is very strange .

Thanks
Thierry

mike sears ���crit:

Recently I've been noticing a lot of odd errors in our postgres logs, that involves a great deal of broken pipes and pq_recvbuf entries. I only noticed this when tables were not being created and am not sure what exactly is going on.

this is just a small bit of what keeps popping up in my logs, and if someone could help explain whats going on would be greatly apreciated.

NOTICE: CREATE TABLE will create implicit sequence 'faq_id_seq' for SERIAL column 'faq.id'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'faq_pkey' for table 'faq'
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
DEBUG: ProcessUtility: create table faq(id serial, ref int8, body text, status char(1) DEFAULT 'N' NOT NULL, primary key(id));
pq_flush: send() failed: Broken pipe
pq_recvbuf: recv() failed: Broken pipe

Mike

=====================
Abbondanza Thierry
schemy@freesurf.fr
http://schemy.free.fr
=====================

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#7Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Noname (#5)
Re: Broken pipes 2

its not just the messgaes that bother me, its the fact that once the first
eror message shows up then all of the sql commands never get executed
properly. switching to 4.0.5 isn't an option due to other used functions in
4.0.6

Try out included patches for 4.0.6. They were made by one of a
Japanese PHP developers, and I haven't tried yet though.

Attachments:

php_pgsql.h.diff.gzapplication/octet-streamDownload
pgsql.c.diff.gzapplication/octet-streamDownload
#8Noname
schemy@freesurf.fr
In reply to: Tatsuo Ishii (#7)
Re: Broken pipes 2

The two files you send are php_pgsql.h.diff and pgsql.c.diff
but the content is binary not text,
If it is an error, could you send again the two files else
what must i do with those files ?

Best Regards,
Thierry

Tatsuo Ishii ���crit:

its not just the messgaes that bother me, its the fact that once the first
eror message shows up then all of the sql commands never get executed
properly. switching to 4.0.5 isn't an option due to other used functions in
4.0.6

Try out included patches for 4.0.6. They were made by one of a
Japanese PHP developers, and I haven't tried yet though.

=====================
Abbondanza Thierry
schemy@freesurf.fr
http://schemy.free.fr
=====================

#9Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Noname (#8)
Re: Broken pipes 2

The two files you send are php_pgsql.h.diff and pgsql.c.diff
but the content is binary not text,
If it is an error, could you send again the two files else
what must i do with those files ?

They are gzipped files.
--
Tatsuo Ishii