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
19
votes
2 answers

Puma Cluster configuration on Heroku

I need some help with my configuration of Puma (Multi-Thread+Multi-Core Server) on my RoR4 Heroku app. The Heroku docs on that are not quite up-to-date. I followed this one: Concurrency and Database Connections for the configuration, which does not…
Miiller
  • 1,063
  • 1
  • 10
  • 29
18
votes
6 answers

How to know the number of active threads in Puma

I am trying to see the number of active puma threads on my server. I can not see it through ps: $ ps aux | grep puma healthd 2623 0.0 1.8 683168 37700 ? Ssl May02 5:38 puma 2.11.1 (tcp://127.0.0.1:22221) [healthd] root 8029 0.0…
fguillen
  • 36,125
  • 23
  • 149
  • 210
18
votes
2 answers

My app keeps creating database connections, how do I trace the reason?

I have a Ruby on Rails application running on Heroku. I keep getting these messages in the log: 2015-05-05T16:11:14Z app[postgres.27102]: [AQUA] connection received: host=xx.xxx.xx.26 port=60278 2015-05-05T16:11:14Z app[postgres.27102]: [AQUA]…
Johnny
  • 7,073
  • 9
  • 46
  • 72
18
votes
2 answers

How can I detect whether my code is running "inside" Sidekiq server or Puma?

I'm using Puma as a web server, and Sidekiq as my queue runner. For multiple things (Database connections, Redis connections, other external services) I'm using the ConnectionPool gem to manage safe access to connections. Now, depending on whether…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
17
votes
1 answer

Is RAILS_MAX_THREADS something that Puma will set and scale during build time , or should I set it?

I know Rails 5 ships with Puma (which we're using) and will look for RAILS_MAX_THREADS as an environment variable or default to 5 threads, but I'm receiving timeout errors with the default value. I looked at my database and found its max connections…
Michael
  • 1,786
  • 5
  • 23
  • 42
17
votes
3 answers

How can I serve assets in /public that are not part of the asset pipeline with puma/nginx?

This is an AWS question, I'm using the Ruby 2.2 (Puma) platform. My compiled assets (in /public/assets) are served as expected. The other assets in /public are not being served (404). Where do I configure this? Is this an nginx problem? or a puma…
chrisp
  • 2,181
  • 4
  • 27
  • 35
17
votes
2 answers

why did gitlab 6 switch back to unicorn?

Gitlab 6.0 was released yesterday. I am curious to know why they switched to Unicorn from Puma. Versions prior to 5 were using Unicorn. I thought switch to Puma was for the better. Is there a technical reason for this switch?
Litmus
  • 10,558
  • 6
  • 29
  • 44
16
votes
2 answers

Puma "Terminating timed out worker" after rendering HTML

I am new to AWS Beanstalk-Rails-Puma-Nginx. After deploying my RAILS app to Beanstalk, all my api calls work fine, but HTML pages are causing error. When opening my HTML page - Nginx throws 502 Bad Gateway error. Puma log : Started GET "/admin"…
Disha
  • 776
  • 9
  • 19
16
votes
1 answer

ActiveRecord::ConnectionNotEstablished - No connection pool for X

I can't make my sinatra/ruby app hosted on heroku works as desired. I fiddled with some setup trying to resolve this issue but so far no results. ActiveRecord::ConnectionNotEstablished - No connection pool for User: 2015-06-25T14:26:11.736854+00:00…
Jacek Kwiecień
  • 12,397
  • 20
  • 85
  • 157
16
votes
0 answers

Is Puma better than Unicorn for Ruby 1.9.3 and Rails 3.2?

There is a lot of talk about Puma and how it is faster than Unicorn. But, they also mention that it is more suitable for instances of JRuby and Rubinius. MY question: What about a Rails 3.2 app with Ruby 1.9.3? Unicorn or Puma?
pratski
  • 1,448
  • 2
  • 22
  • 37
15
votes
2 answers

How to get systemd to restart Rails App with Puma

I've been struggling with this a week now and really can't seem to find an answer. I've deployed my Rails App with Capistrano. I use Puma as a server. When I deploy, everything works ok. The problem is to get Puma to start at reboot and/or when it…
WagnerMatosUK
  • 4,309
  • 7
  • 56
  • 95
15
votes
1 answer

Using Rails and Puma with subdomains lvh.me?

I'm using Rails 4 with subdomains, and now switched from Unicorn to Puma. Seems to work fine, but when I try to start "rails s" I get: Rails 4.2.0 application starting in development on http://localhost:3000 I need to run the following rails s -p…
userden
  • 1,615
  • 6
  • 26
  • 50
15
votes
4 answers

How to run rails puma server with config file using 'rails s puma'

I am able to run a puma server in rails using either rails s puma or just puma. According to this answer, running rails s puma makes the server aware of the rails environment. It shows server errors etc that running puma alone does not. I want to…
Subtletree
  • 3,169
  • 2
  • 18
  • 25
15
votes
1 answer

Where does Puma log to

I have been using Thin to run my ruby Sinatra applications but I am now switching over to Puma. Thin creates its own log log/thin.log which I use. I noticed that Puma doesn't produce a log file (not that I can see). I have tried googling for…
alexjfno1
  • 337
  • 1
  • 3
  • 14
14
votes
3 answers

Foreman/Puma isn't using the specified port in dev env

I set the port as 3000 in my application.yml (figaro managing env variables) rails s uses port 3000 but when I run foreman start (as recommended by Heroku) I get the following output 14:53:23 web.1 | started with pid 24425 14:53:23 web.1 | [24425]…
Voska
  • 321
  • 1
  • 3
  • 12
1 2
3
81 82