Rails taking too much RAM

Hi,

I am trying to deploy my application that requires rails-2.3.8,
ferret_server running in background(DRB) and workling_client+sterling.

Above configuration is running on a VPS with 512MB, latest Ruby
Enterpise Edition+
passenger+nginx+mysql. But I continue to see out of memory issues.
What I notice that every ruby thread is consuming 15%of 512MB(from
top) including workling and ferret_server.

Are there some ways to fine tune ruby, passenger or others to make
sure that I do not run out of memory ? From REE documentation, it
seems that ruby thread spawned by passenger can share rails
environment
and application code. Is it possible to do similar kind of sharing
with passenger+ferret_server+workling, because it seems that each one
of these is loading same code separately.

What are the the other ways to reduce RAM requirement ?

Any help will be appreciated.

Thanks,
np

What are the the other ways to reduce RAM requirement ?

You probably need to figure out what is eating all that RAM.
memprof might help.
-r