mongrel

How to do a rolling restart of a cluster of mongrels

此生再无相见时 提交于 2019-12-05 04:15:54
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 mongrel_cluster gem myself. Thanks! I agree with the seesaw approach more than the rolling approach you are seeking. The problem is that you end up in situations where load balancing can throw users back and forth between different versions of the application while

Why doesn't mongrel start in Rails 3.2.rc?

久未见 提交于 2019-12-05 03:52:05
GEMFILE that starts mongrel gem 'rails', '3.1.0' gem 'mongrel', '>=1.2.0.pre2' GEMFILE that start WEBrick (not mongrel) gem 'rails', '3.2.0.rc2' gem 'mongrel', '>=1.2.0.pre2' Starting on Rails 3.2 you must specify the server you want to use, otherwise Webrick will be used. So, to use mongrel, you must place the gem at your Gemfile AND start the server like this: $ rails s mongrel 来源: https://stackoverflow.com/questions/8853338/why-doesnt-mongrel-start-in-rails-3-2-rc

What are your favorite Ruby on Rails books and why? [closed]

孤街醉人 提交于 2019-12-04 14:33:05
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . 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

Does/can Passenger use clusters like Mongrel?

…衆ロ難τιáo~ 提交于 2019-12-04 14:16:05
I'm just curious if Passenger does or can utilize clusters like Mongrel can. If so, how can I specifically run Passenger with clusters? I'm using nginx. And if not, how does it outperform Mongrel so well? Mongrel Cluster just runs a specified number of Mongrel processes and assigns incoming HTTP requests to them using Apache's mod_proxy_balancer module which acts as a reverse proxy and performs load balancing. Passenger spawns worker (Ruby) processes to handle HTTP requests using one of three different and configurable strategies . When Passenger's smart spawning method is used it is able to

How to view debug code in Thin console window?

南楼画角 提交于 2019-12-04 09:41:37
In Mongrel, we are able to see any ruby debug code. After installing thin and doing thin start . I don't see any debug code on the console window. Is this nromal? Are we supposed to use tail -f log/development.log in a new console window to view the debug code? Yes. The solution with tail is normal, and you should use it. You could also try to start your server this way : rails server thin It shows your log, in Rails 3 at least. You can use a Procfile with foreman : Procfile web: thin start -p $PORT logger: tail -f log/development.log Example $ foreman start -p 3000 Benj The solution is to add

How do you handle SSL in development?

北慕城南 提交于 2019-12-04 08:16:45
问题 I have an application that uses HTTPS for some of its routes in conjunction with the ssl_requirement plugin. It's deployed and is working fine in production. The question is how best to handle this in development, because at the moment I'm simply hacking my routes.rb to remove the :requirements key and obviously that's not very convenient or elegant: map.resource :session, :controller => 'session', :only => [:new, :create, :destroy], :requirements => { :protocol => 'https' } Ideally I'd like

First request to Rails app is very slow

为君一笑 提交于 2019-12-04 07:21:05
always the first request (of a working session) to my Rails app is lagging. Switching to production mode doesn't help. I use mongrel and the other requests are handled with acceptable speed. How do I make it faster? Regards If you post the contents of the log as that first request is processed then perhaps we can figure out what's making it so slow. For example, this is my log as the first user accesses the site Booting Mongrel (use 'script/server webrick' to force WEBrick) Rails 2.1.0 application starting on http://0.0.0.0:3000 Debugger enabled Call with -d to detach Ctrl-C to shutdown server

gem install mongrel fails with ruby 1.9.1

不打扰是莪最后的温柔 提交于 2019-12-03 11:53:02
问题 I initiated myself into rails development yesterday. I installed ruby 1.9.1, rubygems and rails. Running gem install mongrel worked fine and ostensibly installed mongrel too. I am slightly puzzled because: script/server starts webrick by default which mongrel returns nothing locate mongrel returns lots of entries like /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1 /Developer/SDKs/MacOSX10.5.sdk/System/Library

Ruby On Rails is slow…?

我的未来我决定 提交于 2019-12-03 04:40:43
问题 I'm writing a web application to monitor a furniture factory production flow. It has thousand of data to handle. So far, I run RoR on Mongrel + MySQL and it's really really slow (2-4min for some views). When I look at RoR logs, it seems that database queries aren't slow (0-10ms). Is RoR slow when it converts database data to object ? Is Mongrel slow ? Edit : First thing: I was in dev. env. In production environment, the slowest view takes 2min (which would turn down to less than 1min on a

Recommendations (and Differences) between different Ruby on Rails Production Web Servers

醉酒当歌 提交于 2019-12-03 03:20:01
问题 Very soon I plan on deploying my first Ruby on Rails application to a production environment and I've even picked a webhost with all the managed server and Capistrano goodness you'd expect from a RoR provider. The provider allows for Mongrel, Thin, Passenger & FastCGI web servers, which seems very flexible, but I honestly don't know the differences between them. I have looked into them some, but it all gets a bit much when they start talking about features and maximum simultaneous requests -