postgres error - ghdrako/doc_snipets GitHub Wiki
53200 Out of Memory
SHOW work_mem;
SHOW max_connections;
select * from pg_settings where name='work_mem';
select setting::int/1024 work_mem_in_mb from pg_settings where name='work_mem';
Often out of memory occurs when operating a combination of too high work_mem together with a high number of active connections. If you are getting frequent OOM errors a good first step is to reduce work_mem
and monitor the number of active connections at the time of the issue.
SELECT count(*) FROM pg_stat_activity; -- number of active connections