My app uses a lot of memory


#1

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 ?


#2

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


#3

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…


#4

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?


#5

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.