Comments (10)
nginx/1.0.13
Oops, sorry, my bad. nginx logs shows me: *1 connect() to unix://tmp/puma.sock failed (13: Permission denied) while connecting to upstream
chmod a+rw /tmp/puma.sock
does the trick
from puma.
huh ok so I tried puma -b unix://tmp/sockets/puma.sock config.ru, but doesn't seem to be playing well with nginx, just gives me a bad gateway error. works fine if I don't use a socket and just use a custom port.
from puma.
and my nginx setup works fine with unicorn's sockets.
from puma.
Was the first attempt calling puma via "rails server"? It looks like it got heavily confused because it's got a port number in there too.
I did just test it using nginx and it seems to work fine. What nginx configuration do you have it? Does the request show up in puma's log at all?
from puma.
+1
also tried to pair it with nginx, but all I've got is "Bad Gateway"
this configuration works well with Unicorn, but not with Puma
nginx.conf:
upstream puma {
server unix://tmp/puma.sock fail_timeout=0;
}
config/puma.rb:
bind "unix:///tmp/puma.sock"
pidfile "/tmp/puma.pid"
running as:
~$ puma -C ./config/puma.rb config.ru
Puma 1.0.0 starting...
* Min threads: 0, max threads: 16
* Listening on unix:///tmp/puma.sock
Use Ctrl-C to stop
from puma.
I'm still unable to reproduce this issue. What is in config.ru?
from puma.
Just default Rails app
require ::File.expand_path('../config/environment', __FILE__)
run TestApp::Application
from puma.
What version of nginx are you testing against? Does anything render?
from puma.
Oh interesting! So it was a permission problem. I'll investigate the proper way to set the perms of a unix socket.
from puma.
Related to this #73
from puma.
Related Issues (20)
- Support Ruby 3.3's `Process.warmup` before fork HOT 14
- Error responses written twice HOT 1
- Specify multiple licences in the gemspec? HOT 17
- Puma cluster not reaping child processes when PID is 1 with Puma 6.4.1 HOT 18
- High latency on puma HOT 2
- Puma and Puma Dev Linux issue
- Phased-Restart Causes Action Cable Connection Loss on Rails App Restart HOT 3
- Add a hook for "before shutdown" HOT 6
- Systemd watchdog kills puma during hot restart. HOT 4
- NoMethodError: undefined method `release' for Rack:Module error at "rails s" initialization time HOT 5
- Staging environment, request.ENV['HTTP_HOST'] displays 2 urls when it should be a single url HOT 1
- HttpParserError raised when body (chunk) exceeds 4096 bytes does not end with "\r\n" HOT 4
- undefined method `log_writer' for #<Puma::Launcher on usin plugin :solid_queue in puma HOT 1
- `TestWorkerGemIndependence#test_changing_nio4r_version_during_phased_restart` fails in head builds
- Option to restrict cipher suites for TLS1.3
- Requests with a caret (`<` or `>`) in a query parameter raise a `Puma::HttpParserError` HOT 10
- Random freezes in dev mode
- Puma doesn't start the Rails app after run
- "undefined method `on_booted` for nil:NilClass" on "pumactl start" HOT 2
- Large number of workers are booting too long or not booting the first time HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puma.