mongrel

How do I gracefully shut down a Mongrel web server

My RubyOnRails app is set up with the usual pack of mongrels behind Apache configuration. We've noticed that our Mongrel web server memory usage can grow quite large on certain operations and we'd really like to be able to dynamically do a graceful restart of selected Mongrel processes at any time. However, for reasons I won't go into h...

RoR on Windows with Mongrel

Where is the best tutorial for getting RoR working on a windows box with Mongrel? I'm a complete novice at server management, so the more detailed the better! ...

How do you restart Rails under Mongrel, without stopping and starting Mongrel

Is there a way to restart the Rails app (e.g. when you've changed a plugin/config file) while Mongrel is running. Or alternatively quickly restart Mongrel. Mongrel gives these hints that you can but how do you do it? ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reloa...

Mongrel hangs with 100% CPU / EBADF (Bad file descriptor)

We have a server with 10 running mongrel_cluster instances with apache in front of them, and every now and then one or some of them hang. No activity is seen in the database (we're using activerecord sessions). Mysql with innodb tables. show innodb status shows no locks. show processlist shows nothing. The server is linux debian 4.0 Ru...

Mod_rails and mongrel running on the same server?

I'm currently running mongrel clusters with monit watching over them for 8 Rails applications on one server. I'd like to move 7 of these applications to mod_rails, with one remaining on mongrel. The 7 smaller applications are low-volume, while the one I'd like to remain on mongrel is a high volume, app. As I understand it, this would b...

How to do a rolling restart of a cluster of mongrels

Anybody know a nice way to restart a mongrel cluster via capistrano in a "rolling" style, eg, one mongrel at a time. Would be great to have a bit of wait time in there as well for each, to let the mongrel load the rails app up as well. I've done some searching, and haven't found too much, so looking for help before I dive into the mong...

Why do I get an error when starting ruby on rails app with mongrel_rails

Why do I get following error when trying to start a ruby on rails application with mongrel_rails start? C:\RailsTest\cookbook2>mongrel_rails start ** WARNING: Win32 does not support daemon mode. ** Daemonized, any open files are closed. Look at log/mongrel.pid and log/mongr el.log for info. ** Starting Mongrel listening at 0.0.0.0:30...

Preventing Mongrel/Mysql Errno::EPIPE exceptions

I have a rails app that I have serving up XML on an infrequent basis. This is being run with mongrel and mysql. I've found that if I don't exercise the app for longer than a few hours it goes dead and starts throwing Errno::EPIPE errors. It seems that the mysql connection get timed out for inactivity or something like that. It can be re...

How do I configure mongrels return mime types

How do I configure the content-types returned from mongrel. Speficially I want it to return some javascripts files as application/x-javascript to try and reproduce a bug I am seeing on a remote server ...

What are your favorite Ruby on Rails books and why?

I'm looking to pick up a few books on RoR to help teach myself how to build a scalable RoR app. I have read the RailsSpace book, and am starting the Rails Way book tonight. Some topics of interest are: REST - considering using Amazon's SimpleDB Using RSpec effectively memcached - server architecture and code implementation mongrel -...

Capistrano not restarting Mongrel clusters properly

I have a cluster of three mongrels running under nginx, and I deploy the app using Capistrano 2.4.3. When I "cap deploy" when there is a running system, the behavior is: The app is deployed. The code is successfully updated. In the cap deploy output, there is this: executing "sudo -p 'sudo password: ' mongrel_rails cluster::restar...

What deployment directories do you use for Rails applications (deploying to a debian box)?

I wonder what's the best deployment directory for Rails apps? Some developers use directories such as /u/apps/#{appname}. Are there any advantages when using /u/apps/#{appname} instead of /var/www/#{appname} or other OS default directories? Obviously I want to pick the directory with the best security properties and the least friction f...

Why is Mongrel failing to pick up the correct HTTP verb?

I have an extremely simple routes.rb in my Rails app: ActionController::Routing::Routes.draw do |map| map.resources :tags end Starting up my app with script/server and pointing my browser to localhost:3000/tags/ yields: ActionController::MethodNotAllowed Only get and post requests are allowed. ... Starting up my app with script...

Mongrel cluster and multi-applications problem

Hi, we're running in this issue. We're using a web service (using soap4r) to run some kind of searches and the problem appears when the webservice server is down and our aplication is trying to connect to it. At that point the application is unreachable, and all the customers are blocked. What can we do to avoid that? Is possibile to ...

Proxy choices: mod_proxy_balancer, nginx + proxy balancer, haproxy?

We're running a Rails site at http://hansard.millbanksystems.com, on a dedicated Accelerator. We currently have Apache setup with mod-proxy-balancer, proxying to four mongrels running the application. Some requests are rather slow and in order to prevent the situation where other requests get queued up behind them, we're considering opt...

Mongrel::DirHandler equivalent for Passenger

I'm using Mongrel::DirHandler to control response headers for static files - this works great on my dev machine. My production machine uses Passenger so my headers aren't getting set. How do I control headers for static files when using Passenger? snippet from my environment.rb: if defined? Mongrel::DirHandler module Mongrel clas...

Multiple rail apps using Apache and Mongrel

I am actually developing and application that has around 15 modules, all of them using the same database. I am using Apache + Mongrel, I cannot use Passenger because I am working on Windows (please forgive me for this deadly sin!) Which of the following is a better approach? Deploy multiple small rails applications using a virtual se...

Mysterious Mongrel Rails crash

Running Mongrel 1.1.5 on Rails 2.1.2 using PostgreSQL 8.3 via ruby-pg 0.7.9 on OS X 10.4 server... Added restful_authentication and exception_notification, the latter of which appears to be doing me no good when Mongrel simply dies with "Illegal instruction" every time I select /RESOURCE_NAME/new. Doesn't matter what resource. In deve...

Can apache's ProxyRemote be used to proxy HTTPS requests to mongrel for processing?

So I have a custom proxy that is written in ruby using mongrel to handle some fairly complex caching logic. This works great for both http and ftp requests, however since mongrel is not designed to handle https requests, I wish to front the whole thing with apache and make use of the ProxyRemote command to pass through to mongrel for ht...

Mongrel hangs

Hi all, I'm running into a problem in a Rails application. After some hours, the application seems to start hanging, and I wasn't able to find where the problem was. There was nothing relevant in the log files, but when I tried to get the url from a browser nothing happened (like mongrel accept the request but wasn't able to respond). ...