Skip site navigation (1) Skip section navigation (2)

Re: out of memory error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vincent Dautremont <vincent(at)searidgetech(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: out of memory error
Date: 2012-05-22 17:33:43
Message-ID: 3902.1337708023@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Vincent Dautremont <vincent(at)searidgetech(dot)com> writes:
>  after a few days, i'm seeing the following logs in a database (postgresql
> 8.3.15 on Windows)
> running with rubyrep 1.2.0 for syncing a few table small that have frequent
> update / insert/ delete.
> I don't understand it and I'd like to know what happens and why. How to get
> rid of it.

Well, this is a bit unusual:

> TopMemoryContext: 197681816 total in 24131 blocks; 394104 free (24179
> chunks); 197287712 used

It's not normal to have so much stuff in TopMemoryContext.  That could
represent a leak, but it's also possible that that's just management
overhead for all of these contexts:

>     SPI Plan: 1024 total in 1 blocks; 912 free (0 chunks); 112 used
>     CachedPlan: 1024 total in 1 blocks; 248 free (0 chunks); 776 used
>     CachedPlanSource: 1024 total in 1 blocks; 96 free (0 chunks); 928 used
>     SPI Plan: 1024 total in 1 blocks; 928 free (0 chunks); 96 used

> .
> .
> . there it goes for about 80MB of log then it ends
> .
> .
>  SPI Plan: 1024 total in 1 blocks; 912 free (0 chunks); 112 used
>     CachedPlan: 1024 total in 1 blocks; 248 free (0 chunks); 776 used
>     CachedPlanSource: 1024 total in 1 blocks; 96 free (0 chunks); 928 used

That's a *heck* of a lot of SPI plans.  You haven't provided any
information that would let anybody diagnose why you have so many,
though.  Tell us about your usage patterns, especially of PL-language
functions.

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: Vincent DautremontDate: 2012-05-22 18:04:39
Subject: Re: out of memory error
Previous:From: Vincent DautremontDate: 2012-05-22 16:44:41
Subject: out of memory error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group