Re: Out of memory error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Out of memory error
Дата
Msg-id 20261.1355155367@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Out of memory error  (Eelke Klein <eelke@bolt.nl>)
Список pgsql-general
Eelke Klein <eelke@bolt.nl> writes:
> In a database of one of our customers we sometimes get out of memory
> errors. Below I have copy pasted one of these very long messages.
> The error doesn't always occur, when I copy paste the query and run it
> manually it works.

The memory map doesn't look out of the ordinary in the slightest.  The
only usage that amounts to anything worth noticing is

>           HashBatchContext: 19128368 total in 13 blocks; 747952 free (5 chunks); 18380416 used

but that seems quite legitimate considering you have work_mem set to 32MB.
So I don't see that Postgres is doing anything wrong or unusual here.
It seems the machine actually is running out of memory.

> Memory parameters are:
> shared_buffers = 4GB
> temp_buffers = 32MB
> work_mem = 32MB
> maintenance_work_mem = 256MB

That shared_buffers setting seems a bit excessive for a machine with
only 8GB RAM.  Do you also have swap disabled on this box?  If so, the
OS only has 4GB to play in for all processes and disk cache combined,
so it wouldn't be too hard to envision it running out of space.  Perhaps
watching the machine's overall RAM situation with "top" or another tool
would give more insight.

            regards, tom lane


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Problem with aborting entire transactions on error
Следующее
От: Martin French
Дата:
Сообщение: Re: Problem with aborting entire transactions on error