Did you read this http://www.postgresql.org/docs/9.2/interactive/kernel-resources.html. What you kernel settings for vm.overcommit_memory? If you have vm.overcommit_memory=2 you can try set vm.overcommit_ratio=100. What say /proc/meminfo?
2013/11/23 Strahinja Kustudić <strahinjak@xxxxxxxxxxx>
I can't help you why exactly you are getting out of memory errors, but they can happen with high work_mem setting. work_mem is too high for 29GB of memory, try lowering it to something like 10MB. You can also lower shared_buffers to half of what you set.Regards,StrahinjaOn Sat, Nov 23, 2013 at 5:20 PM, Dzmitry <dzmitry.nikitsin@xxxxxxxxx> wrote:
Hi guys,After update postgres 9.2 to 9.3.1 I see issues Out of memory ERROR, there a lot of data, but I can't say it's useful for me :( I have postgres 9.3 configured on ubuntu 12.04.2 with 29 GB memory(I am monitoring my server with newrelic and it does not show that my memory exceed 10GB at any time). My postgres configuration:max_connections = 350shared_buffers = 8GBtemp_buffers = 8MBwork_mem = 50MBmaintenance_work_mem = 1GBeffective_cache_size = 22GBconstraint_exclusion = partitionError message below, any help ?ERROR: out of memoryDETAIL: Failed on request of size 6520.STATEMENT: SELECT "users".* FROM "users" WHERE (lower(email) = 'bburgess828@xxxxxxxxx') LIMIT 1FATAL: out of memoryLOG: duration: 1222.511 ms statement: SELECT "users_for_emails".* FROM "users_for_emails" WHERE "users_for_emails"."send_job_planner" = 't' AND "users_for_emails"."activity" = 0 AND (("users_for_emails"."type_user" = 'Customer' AND "users_for_emails"."completed_at" IS NOT NULL)) AND (("users_for_emails"."specialization_id" IS NOT NULL OR ("users_for_emails"."function_id" IS NOT NULL AND "users_for_emails"."function_id" IN (105, 110, 112, 114, 119, 121, 122, 129, 131, 148)))) ORDER BY "users_for_emails"."id" LIMIT 100 OFFSET 27400TopMemoryContext: 454296 total in 53 blocks; 26656 free (127 chunks); 427640 usedTopTransactionContext: 8192 total in 1 blocks; 7392 free (0 chunks); 800 usedRI compare cache: 24576 total in 2 blocks; 15984 free (5 chunks); 8592 usedRI query cache: 8192 total in 1 blocks; 3744 free (0 chunks); 4448 usedRI constraint cache: 40688 total in 2 blocks; 3744 free (0 chunks); 36944 usedBtree proof lookup cache: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 usedCFuncHash: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 usedTsearch dictionary cache: 8192 total in 1 blocks; 2704 free (0 chunks); 5488 usedTsearch parser cache: 8192 total in 1 blocks; 2704 free (0 chunks); 5488 usedTsearch configuration cache: 8192 total in 1 blocks; 2704 free (0 chunks); 5488 usedPrepared Queries: 24576 total in 2 blocks; 15984 free (5 chunks); 8592 usedTableSpace cache: 8192 total in 1 blocks; 3216 free (0 chunks); 4976 usedType information cache: 24240 total in 2 blocks; 3744 free (0 chunks); 20496 usedOperator lookup cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 usedMessageContext: 2097152 total in 9 blocks; 33608 free (483 chunks); 2063544 usedOperator class cache: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 usedsmgr relation table: 122880 total in 4 blocks; 36080 free (14 chunks); 86800 usedTransactionAbortContext: 32768 total in 1 blocks; 32736 free (0 chunks); 32 usedPortal hash: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 usedPortalMemory: 8192 total in 1 blocks; 8160 free (1 chunks); 32 usedRelcache by OID: 57344 total in 3 blocks; 19600 free (6 chunks); 37744 usedCacheMemoryContext: 9441072 total in 54 blocks; 2829536 free (1 chunks); 6611536 usedpg_toast_145286835_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedCachedPlan: 7168 total in 3 blocks; 2352 free (0 chunks); 4816 usedpg_toast_48499925_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedpg_toast_44510621_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedpg_toast_42924797_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedpg_toast_996693_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedpg_toast_41896098_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedpg_toast_54021990_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedpg_toast_57326774_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 usedindex_blobs_persistence_token: 1024 total in 1 blocks; 152 free (0 chunks); 872 usedblobs_pkey: 1024 total in 1 blocks; 152 free (0 chunks); 872 usedindex_partners_on_owner_id: 1024 total in 1 blocks; 152 free (0 chunks); 872 usedA lot of other data ….MdSmgr: 57344 total in 3 blocks; 32288 free (0 chunks); 25056 usedLOCALLOCK hash: 122880 total in 4 blocks; 58688 free (13 chunks); 64192 usedident parser context: 0 total in 0 blocks; 0 free (0 chunks); 0 usedhba parser context: 31744 total in 5 blocks; 13296 free (4 chunks); 18448 usedTimezones: 83472 total in 2 blocks; 3744 free (0 chunks); 79728 usedErrorContext: 8192 total in 1 blocks; 8160 free (0 chunks); 32 usedThanks,Dzmitry
--
С уважением Селявка Евгений