> Date: Mon, 8 Nov 2010 20:05:23 +0100 > From: kuba@xxxxxxxxxx > To: pgsql-general@xxxxxxxxxxxxxx > Subject: Re: [GENERAL] ERROR: Out of memory - when connecting to database > > Replaying to my own mail. Maybe we've found the root cause: > > In one database there was a table with 200k records where each record > contained 15kB bytea field. Auto-ANALYZE was running on that table > continuously (with statistics target 500). When we avoid the > auto-ANALYZE via UPDATE table set bytea_column = null; CLUSTER table; > the problem with ERROR: out of memory went away. Run pgtune against you configuration and it will tell you what is recommended. Do you really have 2048 connections to the box? If yes, maybe you need to run pgbouncer with 2048 connections into pgbouncer concentrator and 100 connections to postgres? Will reduce your resource used significantly. Chris |