views:

790

answers:

5

What are the major gotchas and tricks when running Rails on a small slice (256MB)? What is the best server setup for cramped quarters? Passenger, Nginx, Mongrel? What is the best background task processor in this kind of environment? What do you need to watch out for? I'd love to hear the stories of people who have done this and bumped into some of the virtual walls.

+1  A: 

Nginx proxying for a couple of mongrels. Updating gems can cause you to run out of memory, but this can be solved by downloading and compiling rubygems from source. You will have no problem using cron for background tasks as it is very lightweight.

brian
what if your tasks are activerecord and rails dependent and need to run often? I did come across this re: gem updates:http://groups.google.com/group/emm-ruby/browse_thread/thread/a5c46bf4753f15ee?pli=1
srboisvert
+1  A: 

On my 256 slice I run nginx in front of a pair of thin servers. Whatever you decide to go with make sure you're using god or monit to keep your stack in check.

Mike Breen
God leaks memory pretty badly so I'd say use monit.
railsninja
+3  A: 

I'm running Passenger on a 256mb slicehost, no problems. Much, much, much easier to set up than any other alternative. For background stuff I use Starling and Workling and Ryan Bates has an excellent screencast on how to use both together.

Ryan Bigg
Passenger really should be your first choice.
Mike Breen
+1  A: 

I suggest Passenger for it's simplicity and smallish footprint. I have that on my VPS with several domains (256MB VPS on RailsPlayground) and no problems so far. Also, the Starling/Workling combination works pretty well or you could even just use the spawn plugin if your site isn't huge (it's dead simple).

Head
A: 

I'm asking the same questiong myself. I've a Slice 256 with 4 Rails 1.2.6 sites running pretty decently on Lighttpd + FastCGI; although it's such and old configuration, it's proven reliable enough for my smallish websites.

Now I'd like to upgrade some to Rails 2.x and I'm wondering if the same Slice 256 can take an Apache2 + Passenger configuration, since it worked great on my local development Linux box.

So my question is: Is a Slice 256 enough for Apache2 + Passenger hosting AT LEAST 4 Rails sites?

Any advice on this will be greatly appreciated.

Might be a good idea to ask that as a separate question here. Rather than as a comment in an old thread. You'll get more eyeballs and maybe some answers that way.
srboisvert
Thanks for the advice. It's my first time posting to Stack Overflow. Will leave another separate question rigth now.