Forum: Ruby on Rails My app uses a lot of memory.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Helder O. (Guest)
on 2007-06-11 02:37
Hi guys.

My problem is the follow:

I use mongrel for my app and in normal use the app use 30 MB +/- of
memory, the problem is when one of my funcionality is used, is a query
that return a very big amouth of data, and the memory fire to 40 MB,
till here no problem, the problem is that the memory never goes back to
the 30 MB again, even if i dont use that funcionality again the momory
remains in the 40 MB for ever ( till some restart ).
At begining i thought that this was a GC problem and have tried to find
and fix it, but with no success.

Any ideas about what can i do ?
liquidautumn (Guest)
on 2007-06-11 03:44
(Received via mailing list)
is your functionality somehow related to rmagick?
in general a bit of growth after application start is ok, while it
cache classes, but if it keep growing, you should check why it does.
40mb is not so big footprint for mongrel process, by the way.

On Jun 11, 1:37 am, Helder O. <removed_email_address@domain.invalid>
Helder O. (Guest)
on 2007-06-11 13:23
liquidautumn wrote:
> is your functionality somehow related to rmagick?
> in general a bit of growth after application start is ok, while it
> cache classes, but if it keep growing, you should check why it does.
> 40mb is not so big footprint for mongrel process, by the way.
>
> On Jun 11, 1:37 am, Helder O. <removed_email_address@domain.invalid>

no rmagik, is just a query with many results, is not the 40MB that
scares me, is what it can be consuming in the near futhur, becauz that
query wil return much more results in some time...
Cliff R. (Guest)
on 2007-06-11 13:30
(Received via mailing list)
> no rmagik, is just a query with many results, is not the 40MB that
> scares me, is what it can be consuming in the near futhur, becauz that
> query wil return much more results in some time..

Personally I would just wait it out and keep an eye on it.  As the last
poster said, 40MB isn't a lot, and you don't really have enough
information yet.  Have you thought about stress testing your app?
Jacob A. (Guest)
on 2007-06-11 14:56
(Received via mailing list)
Helder O. wrote:
> query wil return much more results in some time...
Make the query return less then. Rails is not built for processing of
huge datasets, so most likely you should either be able to make another
query that returns just the data needed or else you should put the query
into some kind of background job and cache the results or whatnot.

An explanation of what you're trying to do would be most helpful if you
would like further advice.

--
Cheers,
- Jacob A.
This topic is locked and can not be replied to.