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
5
votes
1 answer

How can I gracefully restart thin + nginx?

I have my Thin servers configured with nginx and my ROR app is running on them. Running thin restart when I release an update to my code introduces some downtime to my application. I was trying to figure how to gracefully restart the running Thin…
Lester Celestial
  • 1,454
  • 1
  • 16
  • 26
5
votes
2 answers

Can't start thin server as service, RubyGems: Could not find thin

I used the following instructions to install and configure the Thin server as a service on Ubuntu 10.04.4 with Rails 3.2.3: http://articles.slicehost.com/2008/5/6/ubuntu-hardy-thin-web-server-for-ruby Thin server works fine running it from the…
samJL
  • 737
  • 2
  • 11
  • 27
4
votes
1 answer

how to use thin-specific cli options in rails server

I'm using thin and launch it through rails server thin. (If I launch thin separately I have 2 logs (rails and thin log) and no stacktraces in some cases.) If I try to launch it with the option -S /var/tmp/thin/thin.sock rails server complains that…
m33lky
  • 7,055
  • 9
  • 41
  • 48
4
votes
3 answers

How can I change the port that thin binds to when starting a Rails server?

I inherited a Rails application, and I'm trying to understand it. However, when I run: rails s I receive this log: => Booting Thin => Rails 3.2.1 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to…
Geo
  • 93,257
  • 117
  • 344
  • 520
4
votes
2 answers

Job handler serialization incorrect when running delayed_job in production with Thin or Unicorn

I recently brought delayed_job into my Rails 3.1.3 app. In development everything is fine. I even staged my DJ release on the same VPS as my production app using the same production application server (Thin), and everything was fine. Once I…
Chris
  • 1,826
  • 12
  • 15
4
votes
1 answer

Http streaming with thin & eventmachine

I'm playing with EM to achieve streaming and concurrency. I had a problem with streaming... I run the following rack app https://gist.github.com/1394840 using $ rackup -s thin -p 3000 async_app.ru While testing with $ ab -c 10 -n 20…
clc3123
  • 43
  • 1
  • 5
4
votes
2 answers

Thin GZIP decode on local machine

I'm using thin as a Rails server, and I want to send some JSON data gzipped, but in localhost it falls with MultiJson error (unknown symbols). How can I enable gzip support for local thin using without nginx or apache? Error text: 15:46:09 web.1 …
skayred
  • 10,603
  • 10
  • 52
  • 94
4
votes
1 answer

Unicorn log analyzer

Are there any robust Unicorn (Thin additionally would be a plus) web log analyzers that are comparable to the Apache offerings? In other words, I'd like to capture details such as the following at a glance beyond simply relying on Google Analytics,…
ylluminate
  • 12,102
  • 17
  • 78
  • 152
4
votes
1 answer

ambiguous behavior of session variables nginx/ruby/thin server setup

Webserver setup: nginx / thin / ruby-sinatra I use session object from ruby to store various info and return to path session[:username] = 'username' session[:token] = 'token' session[:error] = '' session[:return_to] = '/start_page' Problem1: On…
Schu
  • 1,124
  • 3
  • 11
  • 23
4
votes
1 answer

Rails 3.1 thread safety broken

Or something like that. I've upgraded several apps from Rails 3.0 to Rails 3.1. They are are running on Thin with the multithreaded option enabled, they are all configured with threadsafe!. Worked great in Rails 3.0. But in 3.1, after a few…
bioneuralnet
  • 5,283
  • 1
  • 24
  • 30
4
votes
1 answer

Rack ssl not working with Thin

I installed rack ssl for Rails 3.07 per these instructions: http://www.simonecarletti.com/blog/2011/05/configuring-rails-3-https-ssl/ It is not working. The first https request (for the login page) is made and the page is served securely, but when…
B Seven
  • 44,484
  • 66
  • 240
  • 385
4
votes
2 answers

High load RESTful API in Ruby (sync/async implementation)

I'm struggling with implementing a RESTful API that should return JSON response and should sustain very high load. The highest load will be generated by 'read' part of the API and very little load will be generated by 'write' part of the API. My…
sha1dy
  • 980
  • 2
  • 11
  • 27
4
votes
3 answers

Thin server process hanging at 100% CPU in what appears to be a regex loop. Where can I get more information to debug?

I have a gdb backtrace on it that yields this: #0 match_at (reg=0xcce4a00, str=0xd47b101 "206193045.1297252703.66.40.utmcsr=sendmail|utmccn=52%%20off|utmcmd=email|utmctr=View%20this|utmcct=52%%20off", end=0xd47b1a6 "", sstart=0xd47b101…
Steven
  • 17,796
  • 13
  • 66
  • 118
4
votes
4 answers

How to view debug code in Thin console window?

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…
Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215
4
votes
2 answers

How do I log asynchronous thin+sinatra+rack requests?

I'm writing my first Sinatra-based web app as a frontend to another TCP-based service, using EventMachine and async_sinatra to process incoming HTTP requests asynchronously. When I'm testing my app, all requests to synchronous routes are logged to…
nitrogen
  • 1,559
  • 1
  • 14
  • 26