i'm currently investigating a situation where my PostgreSQL 9.3 instance was killed by the Linux OOM Killer and went to recovery mode. The machine is EC2 Server with 16 GB of RAM and has rather few connections and is used for Business Analsys purposes only.
My assumption is that the reason for the out of memory situation is on one hand a very huge statement but also the fact that work_mem variable is set to 2GB while at the same time 100 connections are allowed.
And here are my questions:
- is my assumption correct
- if so, how can i force postgres to fill the session memory in a controlled manner to make the situation repeatable
I hope you guys can help me soon, thanks in advance and have a good week.