Обсуждение: unexpected EOF on client connection errors

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

unexpected EOF on client connection errors

От
"Charley L. Tiggs"
Дата:
Configuration:

Postgres 8.0.3
Apache 2.0.52
PHP 4.3.9
ADOdb 4.65

I have a web solution that works extremely well. Yet, the following
error appears in the logs a lot.  At least one entry every 5 minutes,
quite a few more when the site is busy.

webuser - xxx.xxx.xxx.xxx(59420) 2005-10-10 11:00:29 EDT> LOG:
08P01: unexpected EOF on client connection
webuser - xxx.xxx.xxx.xxx(59420) 2005-10-10 11:00:29 EDT> LOCATION:
SocketBackend, postgres.c:287

As far as I can tell, I'm not losing any information when this error
occurs. Googling for the problem yields a mixed bag of reasons for
the error but didn't give me a clue as to how to begin tracking it
down.  Can anyone give me an idea of where to begin looking for the
cause of this error?

Thanks,
Charley


Re: unexpected EOF on client connection errors

От
Tom Lane
Дата:
"Charley L. Tiggs" <ctiggs@xpressdocs.com> writes:
> I have a web solution that works extremely well. Yet, the following
> error appears in the logs a lot.  At least one entry every 5 minutes,
> quite a few more when the site is busy.

> webuser - xxx.xxx.xxx.xxx(59420) 2005-10-10 11:00:29 EDT> LOG:
> 08P01: unexpected EOF on client connection

There used to be some client libraries that would just drop the
connection when they were done, instead of sending a polite Terminate
message first; which would lead to the above bleat by the backend.
I don't think that's done anymore by any current versions, but if
you've got one or two applications bound to old libraries then that
could account for it.

The other possibility that comes to mind is connections being lost
due to network issues (eg, firewall timeouts); but if that were the
problem then I'd expect you'd be seeing client-side complaints too.
If you aren't, it's probably just an impolite client library.
Which is not very important, but if you want to get rid of the
log messages...

> Can anyone give me an idea of where to begin looking for the
> cause of this error?

It might help to turn on log_connections and see if you can correlate
the connections that get "unexpected EOF" with a particular client
app.

            regards, tom lane

Re: unexpected EOF on client connection errors

От
Volkan YAZICI
Дата:
Hi,

On 10/10/05, Charley L. Tiggs <ctiggs@xpressdocs.com> wrote:
> I have a web solution that works extremely well. Yet, the following
> error appears in the logs a lot.  At least one entry every 5 minutes,
> quite a few more when the site is busy.
>
> webuser - xxx.xxx.xxx.xxx(59420) 2005-10-10 11:00:29 EDT> LOG:
> 08P01: unexpected EOF on client connection
> webuser - xxx.xxx.xxx.xxx(59420) 2005-10-10 11:00:29 EDT> LOCATION:
> SocketBackend, postgres.c:287

AFAIC, above messages was caused by the 0 return of recv() call, which
makes me think that your PHP scripts's execution maybe killed for some
reason instead of a clean exit. (In practice, PHP closes all of its
previous database connections (unless it's a persistent one) at the
exit stage of the script. Namely, pg_close() doesn't matter on a
non-persistent database connection.) Maybe execution takes to much
time and the script is killed by PHP or any other external proccess
before the exit stage.

H.T.H.