Strange memory behavior with rails - caching in connection?

From: Alex <alex(at)liivid(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Strange memory behavior with rails - caching in connection?
Date: 2009-07-15 08:44:06
Message-ID: 8669e20c-b754-426b-8dad-17de9d5b123a@24g2000yqm.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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?

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message ning 2009-07-15 08:51:50 Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1
Previous Message Alex 2009-07-15 08:42:04 Re: Poor query performance