thin

Thin vs Unicorn on Heroku

萝らか妹 提交于 2019-11-28 05:17:40
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. Even worse, in a non-blocking server, if your i/o loop is blocking you're going to block the entire

Webrick as production server vs. Thin or Unicorn?

丶灬走出姿态 提交于 2019-11-28 03:01:11
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 benefit to using Webrick for development? I've been using Webrick since it comes with rails, and I think

Is there a way Rails 3.0.x can default to using Thin?

人走茶凉 提交于 2019-11-27 14:07:23
问题 I run the Thin webserver for basically every app in my dev/test environments. When I used Mongrel with Rails 2.x, all I had to type was script/server to get it to run the webserver I choose. But with Rails 3, I have to specify Thin every time. Is there a way to get Thin running on my Rails apps by just typing rails s instead of rails s thin ? 回答1: As of Rails 3.2rc2, thin is now run by default on invoking rails server when gem 'thin' is in your Gemfile! Thanks to this pull request: https:/

Is puma the ONLY multi-threaded rails 4 http server?

孤街浪徒 提交于 2019-11-27 13:34:55
I've gotten our stack converted to Rails 4 (yea!) and I'm looking to take advantage of the thread-safe code. Puma works in getting up, stopping it appears to be a different problem :( Is Puma the only multi-threaded rails? Thin -> EventMachine Unicorn -> Forking Puma -> multi-threaded Mongrel -> don't care Webbrick -> don't care No. In alphabetical order: Iodine a HTTP / Websocket Server & EventMachine alternative (kqueue/epoll based) Net::HTTP::Server , despite the lack of advertising, supports multithreading Phusion Passenger has supported multithreading since v4 beta Rainbows! supports

Enable https in a rails app on a thin server

北慕城南 提交于 2019-11-27 13:02:46
问题 I have a rails app running a thin server on heroku. It currently uses http. I would like to use https for bot development and production. Where do I begin to do this. I have looked at this railscast where they show how to use a POW server. I dont want to use a POW server, I want to use a Thin server. I also looked here: But here they assume that you have open ssl insatlled. I haven't found any place which shows how to run https on a thin server from scratch. I was wondering if anyone has any

Cannot install thin on windows

落花浮王杯 提交于 2019-11-27 11:45:13
I cannot install thin gem on windows. Something happen during build of native extensions. Do anybody face same issues? Here is the stack trace: >gem install thin --no-ri --no-rdoc Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb checking for rb_trap_immediate in ruby.h,rubysig.h... no checking for rb_thread_blocking_region()... yes checking for inotify_init() in sys/inotify.h... no checking for __NR_inotify_init in sys/syscall.h... no

RVM and thin, root vs. local user

别来无恙 提交于 2019-11-27 10:08: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 me a uninitialized constant Bundler message—Bundler is only installed in the RVM gems, not the system

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

与世无争的帅哥 提交于 2019-11-27 06:12:46
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 the websocket server running on a different port. Problem is, in this setup it seems that nginx is closing the

Is puma the ONLY multi-threaded rails 4 http server?

我是研究僧i 提交于 2019-11-27 04:04:18
问题 I've gotten our stack converted to Rails 4 (yea!) and I'm looking to take advantage of the thread-safe code. Puma works in getting up, stopping it appears to be a different problem :( Is Puma the only multi-threaded rails? Thin -> EventMachine Unicorn -> Forking Puma -> multi-threaded Mongrel -> don't care Webbrick -> don't care 回答1: No. In alphabetical order: Iodine a HTTP / Websocket Server & EventMachine alternative (kqueue/epoll based) Net::HTTP::Server , despite the lack of advertising,

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

橙三吉。 提交于 2019-11-27 02:36:21
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/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_tcp_server': no acceptor (RuntimeError) from /Users