Re: Postgres connection failures

Поиск
Список
Период
Сортировка
От Mark van Cuijk
Тема Re: Postgres connection failures
Дата
Msg-id DC214042-D833-4FBB-ACDA-C141F1E0CFCD@45cents.nl
обсуждение исходный текст
Ответ на Re: Postgres connection failures  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 04 Apr 2014, at 16:09 , Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Your log extract looks like the server side thought it got a connection
> closure command.  In particular, the server process seems to have exited
> normally, and it did not write "LOG:  unexpected EOF on client connection",
> which it would have done if the TCP connection dropped without receipt of
> such a command.
>
> Based on these facts, I'm going to speculate that your client application
> is multi-threaded and some thread is closing a connection out from under
> another one.  It's usually best to have only one thread touching a
> particular connection; or if you want to maintain a connection pool
> yourself, be very sure you have clear acquire and release rules.

Thanks! I’ve patched the library to print all outgoing messages and indeed it seems one with 0x58 is sent just before
theconnection is closed. Printing a stack trace over there reveals that the pool code thinks the connection is idle and
closesit. I’ll submit a bug report in the node-postgres library. 

Thanks for the help!

/Mark

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres connection failures
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: Indices and Foreign Tables