puma / puma

A Ruby/Rack web server built for parallelism

Home Page:https://puma.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Puma stuck, can not connect from nginx

nguyenngoc2505 opened this issue · comments

Describe the bug

I'm working with nginx and single puma, It working normally but suddenly nginx can not connect to puma and I got some error from nginx like

*11193882 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: xxx.xx.xx.xx, server: _, request: "GET /ping HTTP/1.1", upstream: "http://unix:////tmp/sockets/puma.sock:/ping", host: "host_name"

I don't know why puma stuck and can not connect from nginx with no error from puma_error.log

Check CPU no problem
Check memory no problem
No error on puma_error.log

Does anyone has ideal for this problem? How do I know where the problem is coming from?

Puma config:

#!/usr/bin/env puma
directory 'proj'
rackup "proj/config.ru"
environment 'production'
tag ''

pidfile "proj/tmp/pids/puma.pid"
state_path "proj/tmp/pids/puma.state"
stdout_redirect 'proj/log/puma_access.log', 'proj/log/puma_error.log', true
threads 0,16
bind 'unix:///proj/tmp/sockets/puma.sock'
workers 0
prune_bundler
on_restart do
  puts 'Refreshing Gemfile'
  ENV["BUNDLE_GEMFILE"] = ""
end

Desktop (please complete the following information):

  • OS: Linux
  • Puma Version: 3.12

Puma Version: 3.12

That's an 3 year old Puma version, please use something newer.

Also, this does not look like a problem with Puma, but with your particular environment. Please ask questions like this in a discussion forum, not the issue tracker.