| From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> | 
|---|---|
| To: | Alex <alex(at)liivid(dot)com> | 
| Cc: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: Strange memory behavior with rails - caching in connection? | 
| Date: | 2009-07-17 09:06:37 | 
| Message-ID: | dcc563d10907170206n44af02b4v6226f6b372fe4f54@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
On Wed, Jul 15, 2009 at 2:44 AM, Alex<alex(at)liivid(dot)com> wrote:
> I am using Postgres with Rails.  Each rails application "thread" is
> actually a separate process (mongrel) with it's own connection.
>
> Normally, the db connection processes (?) look something like this in
> top:
>
> 15772 postgres  15   0  229m  13m  12m S    0  0.8   0:00.09 postgres:
> db db [local]
> idle
>
> These quickly grow as the application is used to 50+ Mb per instance.
>
> When I restart mongrel (the Rails application processes) these go back
> down to their normal small size.  That makes me suspect this is not
> normal caching and there is some sort of unhealthy leak going on.
>
> Is there something Rails could be doing to cause these to grow?  Maybe
> the connection is not being cleaned up properly?  Is there some sort
> of connection cache going on?
no, most likely the issue is that top is showing you how much
shared_buffers the process has touched over time and it's nothing.
Show us what you see when you think things are going bad.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | phb07@apra.asso.fr | 2009-07-17 13:25:52 | Re: cluster index on a table | 
| Previous Message | Scara Maccai | 2009-07-17 07:22:42 | Re: cluster index on a table |