The sort multiplier that causes the OOM
400 connections at 8 MB looks like 3.2 GB. With four sort nodes in the heaviest query it is 12.8 GB, and that is the number the server actually has to survive.
- ram-mb
- 12288
- cores
- 8
- max-connections
- 400
- work-mem-mb
- 8
- sort-nodes
- 4
- app-instances
- 4
- pool-per-instance
- 20
- pgbouncer
- no