Questions tagged [puma]

Puma is a simple, fast, threaded, and highly concurrent HTTP server for Ruby/Rack applications.

From the introduction:

Puma is a simple, fast, and highly concurrent HTTP 1.1 server for Ruby web applications. It can be used with any application that supports Rack, and is considered the replacement for Webrick and Mongrel. It was designed to be the go-to server for Rubinius, but also works well with JRuby and MRI. Puma is intended for use in both development and production environments.

Also see the GitHub project.

1218 questions
10
votes
1 answer

Are you trying to open an SSL connection to a non-SSL Puma?

After working on getting a new project to work, I found that for some reason I couldn't start my rails server. I kept getting the following error: HTTP parse error, malformed request: #
iarobinson
  • 277
  • 3
  • 10
10
votes
1 answer

Rails ActionCable on Puma and Nginx not working on production after deploy via capistrano

I create a website using ActionCable via Rails on top of Puma and Nginx on production. But after deploying to the Production server seems like ActionCable is not working because of this problem.WebSocket connection to WebSocket connection to…
Varis Darasirikul
  • 3,907
  • 9
  • 40
  • 75
10
votes
2 answers

Rails server returning HTTP status 0

I understand that sometimes a client will show an HTTP request as returning a 0 status code when the request fails to connect, timesout, etc, but I have never seen a server logging 0 as what it is sending back to the client. I am running a Rails…
Brad
  • 5,428
  • 1
  • 33
  • 56
10
votes
4 answers

action cable subscribing locally, but not on heroku

I've been trying everything I can find online, and nothing is working. Hoping some fresh eyes will see the issue. This is my first time using ActionCable, and everything works great locally, but when pushing to heroku. my logs do not show any…
gwalshington
  • 1,418
  • 2
  • 30
  • 60
10
votes
1 answer

Right way to deploy Rails + Puma + Postgres app to Elastic beanstalk?

I have an Rails 5 API which I am trying to deploy(correctly) on Elastic Beanstalk. Here is my initial config/puma.rb file which I use: threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i threads threads_count, threads_count # Specifies the…
aks
  • 8,796
  • 11
  • 50
  • 78
10
votes
1 answer

Rails query execution causes database spikes

I'm having a problem with my Rails application where some random queries take around 5 seconds or longer to finish. Most of the time the queries are very simple (select * from x where id = ?) and the fields are even indexed too. Here's some more…
Ruben Homs
  • 591
  • 1
  • 7
  • 21
10
votes
3 answers

Why Puma rails server only accepts localhost:3000 rather than 127.0.0.1:3000

Trying out Puma as my Rails server. Anybody know why the Puma rails server only accepts localhost:3000 rather than 127.0.0.1:3000? I'm going to want to test Facebook OAuth, and that will need an IP address.
justingordon
  • 12,553
  • 12
  • 72
  • 116
10
votes
2 answers

Why is Puma only binding to tcp6? (via `rails s`)

Brand new generated Rails 4.2.0 project. Ran rails s, behaved as expected using WEBrick: vagrant@web1:~$ netstat -nlpt Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0…
odigity
  • 7,568
  • 4
  • 37
  • 51
10
votes
1 answer

Puma server dies with no reason

I'm running Puma 2.8.2 server for stubbing some of my back end services. Occasionally Puma server just dies without any reason. There is no errors in error.log And here is excerpt from access.log: 10.210.140.21 - - [15/Oct/2014 09:28:22] "GET…
LukasMac
  • 848
  • 1
  • 8
  • 20
10
votes
1 answer

Server hangs all requests after a while

Our Rails 4.0 application (Ruby 2.1.2) is running on Nginx with Puma 2.9.0. I recently noticed that all requests to our application hang after a while (usually 1 or 2 days). When checking the log, which is set to debug mode, I noticed the…
VinhBS
  • 677
  • 8
  • 17
9
votes
2 answers

How can I configure puma when running Capybara?

I'd like to adjust the puma configuration when running Capybara tests. Changing settings in .env, .env.test (I use dotenv), or config/puma.rb has no effect. Where can I change the configuration? Rails 5.1, poltergeist 1.15.0, capybara 2.14.0, puma…
John Bachir
  • 22,495
  • 29
  • 154
  • 227
9
votes
1 answer

In Puma, how do I calculate DB connections?

I'm trying to figure out how many database connections my app will use. It's Rails 5 hosted on Heroku. Here is my Puma config workers Integer(ENV['WEB_CONCURRENCY'] || 2) threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5) threads threads_count,…
Tallboy
  • 12,847
  • 13
  • 82
  • 173
9
votes
2 answers

Can't install Puma gem on OSX 10.11.3

I just reformat my MacBook and I try to clone of my Rails project. When I do bundle install, Puma gem failed. When I run gem install puma -v '2.13.4', I get this error: Fetching: puma-2.13.4.gem (100%) Building native extensions. This could take a…
Zulhilmi Zainudin
  • 9,017
  • 12
  • 62
  • 98
9
votes
1 answer

Should I use preload_app with Puma on Heroku?

I am running a small Rails app on Heroku with one dyno and several Puma workers. The Puma docs say: General rule is to use preload_app when your workers die often and need fast starts. If you don’t have many workers, you probably should not…
Max Wallace
  • 3,609
  • 31
  • 42
9
votes
0 answers

Rails + Puma + Bunny - Timeout error

When set rabbitmq connection in initializer #config/initializers/rabbitmq.rb $rabbitmq_connection = Bunni.new "amqp://#{user}:#{pass}@#{host}:#{port}#{vhost}" $rabbitmq_connection.start $rabbitmq_channel = $rabbitmq_connection.create_channel than…
Sergii Brytiuk
  • 345
  • 1
  • 12