Questions tagged [thin]

Thin is an EventMachine-based web server written in Ruby for running Rack-based web apps.

Thin is a Ruby web server that glues together 3 of the best Ruby libraries in web history:

the Mongrel parser, the root of Mongrel speed and security Event Machine, a network I/O library with extremely high scalability, performance and stability Rack, a minimal interface between webservers and Ruby frameworks Which makes it, with all humility, the most secure, stable, fast and extensible Ruby web server bundled in an easy to use gem for your own pleasure.

695 questions
121
votes
5 answers

Webrick as production server vs. Thin or Unicorn?

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,…
Vlad
  • 8,038
  • 14
  • 60
  • 92
110
votes
9 answers

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

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…
maeseele
  • 1,101
  • 2
  • 8
  • 3
106
votes
8 answers

How to preserve request url with nginx proxy_pass

I was trying to use Thin app server and had one issue. When nginx proxies the request to Thin (or Unicorn) using proxy_pass http://my_app_upstream; the application receives the modified URL sent by nginx (http://my_app_upstream). What I want is to…
Dmytrii Nagirniak
  • 23,696
  • 13
  • 75
  • 130
65
votes
6 answers

Cannot install thin on windows

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…
Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197
47
votes
4 answers

Should I use thin or unicorn on Heroku Cedar

I recently 'upgraded' my app to the cedar platform on Heroku. By default, I am using thin as a web server. But I have always been tempted to use unicorn for concurrency and having my dyno dollar go father. But I worry there are some gotchas in…
Jonathan
  • 16,077
  • 12
  • 67
  • 106
41
votes
4 answers

Why would I want to use unicorn or thin instead of WEBrick for development purposes?

I've recently found that some people prefer using unicorn_rails instead of the default WEBrick as a web server for developing Rails applications. I understand that if I wanted to use unicorn in production, it could make kind of sense to try it out…
Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
36
votes
1 answer

Rack concurrency - rack.multithread, async.callback, or both?

I'm attempting to fully understand the options for concurrent request handling in Rack. I've used async_sinatra to build a long-polling app, and am now experimenting with bare-metal Rack using throw :async and/or Thin's --threaded flag. I am…
bioneuralnet
  • 5,283
  • 1
  • 24
  • 30
35
votes
7 answers

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

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…
John Reilly
  • 1,790
  • 2
  • 17
  • 18
34
votes
4 answers

How to set Thin as default in Rails 3

I've been starting Thin with thin -V start in development. However, I would like Thin to be the default instead of WEBrick and to be able to start it with rails s. Is there a way to set Thin as the default instead of WEBrick in Rails 3? If that's…
deb
  • 12,326
  • 21
  • 67
  • 86
34
votes
3 answers

Thin vs Unicorn on Heroku

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,…
EugeneMi
  • 3,475
  • 3
  • 38
  • 57
32
votes
6 answers

cURL cannot connect to localhost but browser can

I'm running a Rails app locally (Thin server), and I can connect locally from the browser (localhost:3000), but when I try to use curl, I get: curl -H 'id:1' -i 'http://localhost:3000/api/data' -v * Hostname was NOT found in DNS cache * Trying…
jbeck
  • 2,184
  • 1
  • 19
  • 21
27
votes
4 answers

RVM and thin, root vs. local user

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,…
Rob Cameron
  • 9,674
  • 7
  • 39
  • 42
23
votes
3 answers

An error occurred while installing thin (1.7.2)

i tried to install the thin web server, version 1.7.2 but got an error with the logs: thin.c:359:10: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return…
Dorian
  • 7,749
  • 4
  • 38
  • 57
22
votes
2 answers

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

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 ->…
Daniel
  • 7,006
  • 7
  • 43
  • 49
21
votes
9 answers

How to start thin on the default port?

I'm learning thin server, by now I can use thin start to fire up the server, but the port is 3000, I should type the localhost:3000 in the browser to get the webpage. I want to take off the 3000 port as we normally do with other site. So I set use…
mko
  • 21,334
  • 49
  • 130
  • 191
1
2 3
46 47