Can I use Mongrel with Rails apps?

software development

#1

I’m more familiar with using Mongrel than fcgi for Rails apps. Can I use mongrel on my shared account (I can install the mongrel gem myself, if that’s allowed?)

If so, how would I get Apache traffic destined for my site redirected to a port that Mongrel can listen to?

Thanks
Jeff


#2

I too would much prefer to use mongrel with rails. I am willing and able to set it up my self. Would that be OK?

Steve


#3

Apache answers all HTTP requests on DH machines (remember that they are SHARED Servers) so unless you could redirect to mongrel from apache (and as far as I know mongrel doesn’t work like that) you’re probably not going to get the behavior you want.

NOTE: The terms of service frown on persistent processes.

Of course to really know the answer would require you to post a support request. If you do, please post the answer here.

(I’m not a DH employee)

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!


#4

Mongrel can work exactly like that. That’s how many installations run it.

The TOS on persistent processes is the issue. Now, fast cgi keeps persistent processes around so maybe its OK. I’ll put in a support request today and see what comes out of it.


#5

Cool. Let us know.

(I was under the impression that Mongrel was trying to be the actual web server rather than just redirection. I know that app servers generally run behind a “real” webserver but they have all the same problems we’ve been discussing.)

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!


#6

The answer to the support request was no. We’re not allowed to run our own server processes. I was encouraged to vote for mongrel on the suggestions area – which I had already done. I would encourage any readers to do that if they haven’t.

Mongrel does want to function as its own webserver. Apache can be configured to “proxy” to your mongrel server running over a different port. This allows you to configure the apache server to serve static files like images and stylesheets, leaving your rails application free to handle dynamic requiests.

Steve


#7

That’s what I was afraid of…

Sorry! There are some tricks mentioned here on the forums about how to get rails apps to not terminate too often in the middle of requests.

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!