What should an application do if they get an “out of memory” error?

posted Apr 28, 2017, 9:55 AM by Sachchida Ojha
For example:
Out of memory (seg27 host.greenplumdba.com pid=47093)
VM Protect failed to allocate 4096 bytes, 0 MB available

Here are the possible solutions:
  1.  Tune query to require less memory
  2.  Reduce query concurrency using a resource queue
  3.  Decrease the number of segments per host in the GP cluster
  4.  Increase memory on the host
  5.  Validate gp_vmem_protect_limit at the database level, see calculations below for maximum safe settings
  6.  Use a session setting to reduce the statement_mem used by specific queries
  7.  Decrease statement_mem at the database level
  8.  Set the memory quota on a resource queue to limit the memory used by queries executed within the resource queue