Re: Pg stuck at 100% cpu, for multiple days

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Pg stuck at 100% cpu, for multiple days
Дата
Msg-id 20210830193405.GC26465@telsasoft.com
обсуждение исходный текст
Ответ на Re: Pg stuck at 100% cpu, for multiple days  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Pg stuck at 100% cpu, for multiple days
Список pgsql-hackers
On Mon, Aug 30, 2021 at 09:09:20PM +0200, Laurenz Albe wrote:
> On Mon, 2021-08-30 at 17:18 +0200, hubert depesz lubaczewski wrote:
> > The thing is - I can't close it with pg_terminate_backend(), and I'd
> > rather not kill -9, as it will, I think, close all other connections,
> > and this is prod server.
> 
> Of course the cause should be fixed, but to serve your immediate need:

You might save a coredump of the process using gdb gcore before killing it, in
case someone thinks how to debug it next month.

Depending on your OS, you might have to do something special to get shared
buffers included in the dump (or excluded, if that's what's desirable).

I wonder how far up the stacktrace it's stuck ?
You could set a breakpoint on LogicalDecodingProcessRecord and then "c"ontinue,
and see if it hits the breakpoint in a few seconds.  If not, try the next
frame until you know which one is being called repeatedly.

Maybe CheckForInterrupts should be added somewhere...

-- 
Justin



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Pg stuck at 100% cpu, for multiple days
Следующее
От: "alvherre@alvh.no-ip.org"
Дата:
Сообщение: Re: archive status ".ready" files may be created too early