Re: [GENERAL] Out of memory/corrupted shared memory problem on server

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: [GENERAL] Out of memory/corrupted shared memory problem on server
Дата
Msg-id 20170825104820.heszdtjsalb2xlom@squirrel.exwg.net
обсуждение исходный текст
Ответ на [GENERAL] Out of memory/corrupted shared memory problem on server  (Johann Spies <johann.spies@gmail.com>)
Список pgsql-general
## Johann Spies (johann.spies@gmail.com):

> ------------------
> 2017-08-24 19:23:26 SAST [7532-18] LOG:  server process (PID 4890) was
> terminated by signal 9: Killed

That looks like out-of-memory. Check the kernel log/dmesg to verify.

If it's the dreaded OOM-killer, you should check your overcommit
settings (sysctl vm.overcommit_*) and fix them in a way that
the kernel isn't forced to kill processes (that is, reduce overcommit).

Finally, in some cases it has been helpful to reduce work_mem -
that way PostgreSQL may be skewed away from memory intensive
operations (at the cost of processing time and/or disk IO - but
that's still better than having processes killed and getting no
result at all).
You could check the query plan for the query behind your view
(EXPLAIN) for potentially memory hungry operations.

> max_worker_processes = 24        # (change requires restart)
> max_parallel_workers_per_gather = 4    # taken from max_worker_processes

In case the query updating the materialized view uses parallel
processing, you could save quite some memory by turning that off
(more processes -> more memory usage -> not helpful in your case).

> # (for 60GB)
> kernel.shmall = 15728640
> kernel.shmmax = 64424509440

This is obsolete since PostgreSQL 9.3 ("Greatly reduce System V shared
memory requirements" says the Release Notes).

Regards,
Christoph

--
Spare Space.


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

Предыдущее
От: Johann Spies
Дата:
Сообщение: [GENERAL] Out of memory/corrupted shared memory problem on server
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Out of memory/corrupted shared memory problem on server