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

rails 4 live stream doesn't work with Puma

I'm trying to implement a small test on rails ActiveController::Live with Puma server. I started Puma server by rails s puma, and used curl localhost:3000/messages/events to do test. However there was a long pause before the data is returned all at…
7
votes
5 answers

Disable Rack::CommonLogger without monkey patching

So, I want to have completely custom logging for my sinatra application, but I can't seem to disable the Rack::CommonLogger. As per the sinatra docs all I should need to do is add the following line (tried setting it to false as well): set…
nicohvi
  • 2,270
  • 2
  • 28
  • 42
7
votes
2 answers

rails - nginx + puma - static assets not being served by nginx from the tutorial link provided

I am using Ubuntu. Here is the tutorial Nginx config I am using: upstream my_app { server unix:///home/uname/railsproject/my_app.sock; } server { listen 88; #(I used exact 88 when I am testing now) server_name localhost; # I used exact localhost…
user2139745
  • 1,721
  • 4
  • 19
  • 30
7
votes
1 answer

verify_active_connections! is deprecated in rails 4, what should we do to handle that functionality?

I've been following this post to setup puma with foreman: https://www.digitalocean.com/community/articles/how-to-set-up-zero-downtime-rails-deploys-using-puma-and-foreman The puma script says to verify_active_connections! after connecting but it's…
AntelopeSalad
  • 1,736
  • 1
  • 16
  • 27
7
votes
2 answers

Rails 4, Live Streaming, stays open, blocking requests

I'm trying to use Rails 4 Live Streaming component. It all works except that it seems like the stream stays open and blocks new request. How can I ensure that the connection close down properly when closing down or clicking on a new link within the…
Philip
  • 6,827
  • 13
  • 75
  • 104
7
votes
2 answers

cannot load such file -- rack/handler/puma

My setup and the error I get an error when I start my Sinatra application with rackup and puma. My config.ru file looks like this: #\ -s puma require './controller/main.rb' run Sinatra::Application So when I now use rackup I get this…
Sir l33tname
  • 4,026
  • 6
  • 38
  • 49
7
votes
1 answer

How to get Rails 4 ActionController::Live streaming working with Thin and Ruby 2? And how do Thin and Puma scale with live streaming?

I get it working with Puma, but with Thin I don't get any stream output and I have to kill the server to stop it. I'm testing using tenderlove's initial example outputing the current time: http://tenderlovemaking.com/2012/07/30/is-it-live.html A…
Nico
  • 881
  • 1
  • 6
  • 19
6
votes
3 answers

NoMethodError: undefined method `strings' for Puma::Events:Class

I'm running a pretty simple test, which requires javascript, just to check the index loads and an element is there, something like: class ProfitsTest < ApplicationSystemTestCase setup do @admin = users(:admin) @admin.confirm sign_in…
Cody
  • 436
  • 5
  • 13
6
votes
1 answer

The debug gem's binding.break creates break point but no console prompt

I have a Rails 7 application using gem "debug", platforms: %i[ mri mingw x64_mingw ] for debugging. I am also using WSL2 and Windows Terminal on Windows 11 for my development environment in case that's part of the issue I'm about to describe. If I…
6
votes
1 answer

Puma mini SSL error while connecting to rails server

Rails server throws a SSL error everytime I try to connect to the server. [34087] Puma starting in cluster mode... [34087] * Version 4.3.3 (ruby 2.6.5-p114), codename: Mysterious Traveller [34087] * Min threads: 10, max threads: 10 [34087] *…
MAK
  • 123
  • 1
  • 9
6
votes
1 answer

Is establish_connection on worker boot still required on Rails 6 and Puma?

I read on Heroku that for Rails (4+ they say) I should add the following directive to Puma, when I use multiple workers and I preload the app: on_worker_boot do ActiveRecord::Base.establish_connection end However I have both preload_app! and…
collimarco
  • 34,231
  • 36
  • 108
  • 142
6
votes
1 answer

Puma::MiniSSL::SSLError: OpenSSL error: error:1417A0C1:SSL routines:tls_post_process_client_hello:no shared cipher rails

There is issue running rails server. It always shows Puma error MiniSSL. [57513] Puma starting in cluster mode... [57513] Environment: development [57513] Listening on tcp://0.0.0.0:3001 [57513] Listening on…
6
votes
3 answers

What does Early termination of worker puma log mean and why is it happening?

For my Elastic Beanstalk instance, I am getting a 504 status code response whenever I visit it. When I tail the logs I see the following log on the puma app server: ==> /var/log/puma/puma.log <== [27240] Early termination of worker [27245] Early…
robskrob
  • 2,720
  • 4
  • 31
  • 58
6
votes
1 answer

ActiveStorage::FileNotFoundError but the file actually exists

I am working on this Rails 6.0.21 application (ruby 2.5.5) and using puma 3.12.2 as development web server and ActiveStorage with local disk service. Every now and then my application errors out with ActiveStorage::FileNotFoundError. The actual file…
Nick M
  • 2,424
  • 5
  • 34
  • 57
6
votes
2 answers

machine stack overflow in critical region (fatal)

Trying to run-up a Rails 4 project I developed 4 years ago, and I'm maintaining since then, I've got the next error that stucks the app on start: machine stack overflow in critical region (fatal) I have no problems during this 4 years, but…
foncho
  • 111
  • 8