ErrorContext JDBC Driver,client=10.0.31.109ERROR: out of memory DETAIL: Failed on request of size 262144 优化数据库配置

1. https://pganalyze.com/docs/log-insights/server/S5

More generally, 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, which should improve stability at the cost of more sort/hash operations going to disk instead.

 

It also often makes sense to monitor the number of active connections at the time of the issue, e.g. through pganalyze's Connection Tracing feature.

 

Additionally, if you absolutely need more RAM to work with, you can evaluate reducing shared_buffers to provide more available RAM for memory directly used by connections. This should be done carefully, and whilst actively watching Buffer Cache Hit Ratio statistics

posted @ 2022-05-18 14:01  littlevigra  阅读(304)  评论(3编辑  收藏  举报