Thread: FATAL ERROR

FATAL ERROR

From
"Michael Roth"
Date:
Hi,

first: please excuse my terrible english ... i'm from germany :-)
second: I don't know, whether this is a bug nor whats wrong.

Sometimes we got the following error-message:
PostgresSQL query failed: FATAL 1: Socket command type 2 unknown
pqReadData() -- backend closed the channel unexpectedly. This probably means
the backend terminated abnormally before or while processing the request

We have PHP3-Scripts on our Webserver. They make connections to the
Postgres-DB. The Scripts are
working ok, but sometimes (and ONLY sometimes ...) they produces the error.

We dont know, what goes wrong here or what's the meaning from this the
error-message.

Machine: Intel PII-266, 288 MB RAM
Operating System: Linux 2.2.16
Apache-Version: 1.3.12
PHP-Version: 3.0.16
    PostgreSQL:
    Allow persistent links:Yes
            Persistent links: 0/Unlimited
            Total links:0/Unlimited
            Compilation definitions: PGSQL_INCLUDE=
                                               PGSQL_LFLAGS=
                                               PGSQL_LIBS=
PSQL-Version: 7.0.2

Advanced Thanks for any help.

Regards,
Michael J. Roth

--
Computers are like airconditioners: They stop
working properly if you open windows.
----------------------------------------------------
Michael J. Roth     mailto:MichaelRoth@schmuecker.de
Tel: 069/57005-421, Fax: 069/57005-800
Schmücker&Partner GmbH      http://www.schmuecker.de
Lurgiallee 14, 60539 Frankfurt
----------------------------------------------------




Re: FATAL ERROR

From
Tom Lane
Date:
"Michael Roth" <MichaelRoth@schmuecker.de> writes:
> Sometimes we got the following error-message:
> PostgresSQL query failed: FATAL 1: Socket command type 2 unknown

Curious.  This seems to indicate that the backend has gotten out of sync
with the client, and is trying to interpret some data out of the middle
of a message as the start of a fresh command message.  We used to have
some bugs that would let that happen occasionally, but I thought they'd
all been fixed as of 7.0.*.  It would be useful to try to track down
what happens just before this message appears.  Could you run with query
logging enabled (start postmaster with -d2, and make sure its stderr
output goes somewhere useful)?

> PSQL-Version: 7.0.2

I'd advise upgrading to 7.0.3 (or even 7.1.2, but 7.0.3 would be a
painless update).  There are some nasty bugs fixed as of 7.0.3.
I don't think any of them explain this problem ... but I might be wrong.

            regards, tom lane