Re: Connections closing due to "terminating connection due to administrator command"

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: Connections closing due to "terminating connection due to administrator command"
Дата
Msg-id 03FB3593-9348-4009-B4B3-83D751FCC8C5@unicell.co.il
обсуждение исходный текст
Ответ на Re: Connections closing due to "terminating connection due to administrator command"  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Connections closing due to "terminating connection due to administrator command"  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
> On 27 ביולי 2015, at 18:01, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> Not sure what yo have set up for logging, but you might to crank it up. 13 days between entries for a system that is
inuse all the time seems sort of light to me.
 

Most of the log settings are just the Debian default (except the log prefix). This system is one of several we have,
butit’s intended for quick processing of messages by some of our customers that send low volumes but need quick
response.As such, it processes around 50,000 messages a day, which boils down to around 200,000 or so database requests
aday. It’s very light load, so we don’t get many timeouts or other load-related log entries. I don’t want to log each
query,though, as that seems wasteful to me.
 

> 
>> 
>> NEW INFORMATION: I believe that today’s mishap is related to the July 21 shutdown problem, based on the logs of our
Javaprogram and an inquiry into the way it handles messages that go through a particular path. It seems that one of the
moduleshas a bug and retains stale connections, and since messages that arrive through that path are rare, the first
timeone came after the July 21st shutdown was today.
 
> 
> So what is the module doing?
> 
> Or more the point what is the application doing to deal with the stale connections?

The module keeps a connection pool available to the threads that call it, one connection per thread. It runs a JDBC
preparedstatement. If that prepared statement hits an SQLException, it then logs it in two places and attempts to
recreatethe connection, which is where the bug is. But that bug is just the reason why I didn’t get a fresh connection
afterwards,it’s not the reason why the SQLException happened to begin with (which is that the connection kept for this
particularthread was from before the shut down).
 


I hope this information helps,
Herouth

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Connections closing due to "terminating connection due to administrator command"
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: pgbench tps drop from 5000 to 37 going from localhost to a server 13ms away