thin

Thin vs Unicorn on Heroku

白昼怎懂夜的黑 提交于 2019-11-27 00:52:42
问题 Just wanted to get people's opinions on using Unicorn vs Thin as a rails server. Most of the articles/benchmarks I found online seem very incomplete, so it would nice to have a centralized place to discuss it. Unicron is a multi-processes server, while thin is an event based/non-blocking server. Event-based servers are great... if your code is asynchronous/non-blocking - vanilla rails is blocking. So unless you use non-blocking rails libraries, I really don't see the advantage of using Thin.

Webrick as production server vs. Thin or Unicorn?

会有一股神秘感。 提交于 2019-11-26 23:54:55
问题 It seems like it's taken for granted that you must not use Webrick as production server, but I can't really find anywhere mentioning why. The consensus seems to be: "Webrick is ok for development, but Thin or Unicorn is the choice for production, period." I did look up Thin server's homepage and it talks about requests/second but I don't really understand the graph since there's no annotation. Can anyone let me know why I should use Thin or Unicorn compared to Webrick? Also is there any

RVM and thin, root vs. local user

这一生的挚爱 提交于 2019-11-26 22:19:02
问题 So I'm trying to get thin to run as a service with RVM. After a thin install I manually updated /etc/init.d/thin to use an su - user when running the config command so that thin was running as a local user, rather than root. So far so good. Now, when I try to sudo service thin start it looks like it's trying to use the non-RVM version of Ruby (1.8.7 which was installed on the box to start with) to actually execute the command. I did a gem install thin on the non-RVM version, which then gets

Thin web server: `start_tcp_server': no acceptor (RuntimeError) after git branch checkout

六眼飞鱼酱① 提交于 2019-11-26 12:34:49
问题 A Rails 3.2.0 app, working fine with Thin web server, both locally and on Heroku cedar stack. After: $ git branch work $ git checkout work $ rails server I get: => Booting Thin => Rails 3.2.0 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server >> Thin web server (v1.3.1 codename Triple Espresso) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:3000, CTRL+C to stop Exiting /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems

Can nginx be used as a reverse proxy for a backend websocket server?

荒凉一梦 提交于 2019-11-26 11:55:05
问题 We\'re working on a Ruby on Rails app that needs to take advantage of html5 websockets. At the moment, we have two separate \"servers\" so to speak: our main app running on nginx+passenger, and a separate server using Pratik Naik\'s Cramp framework (which is running on Thin) to handle the websocket connections. Ideally, when it comes time for deployment, we\'d have the rails app running on nginx+passenger, and the websocket server would be proxied behind nginx, so we wouldn\'t need to have