puma

Using Resque, Puma and Scheduler together on Heroku

不问归期 提交于 2019-12-04 04:58:05
问题 After reviewing numerous guides I would like to confirm my setup. Right now my procfile looks like: web: bundle exec puma -C config/puma.rb config.ru resque: TERM_CHILD=1 RESQUE_TERM_TIMEOUT=10 QUEUES=* bundle exec rake resque:work worker: bundle exec rake resque:work COUNT=1 QUEUE=* scheduler: bundle exec rake resque:scheduler ...and in Heroku : ...and my rake resque setup task : require 'resque' require 'resque/tasks' require 'resque/scheduler/tasks' # http://jademind.com/blog/posts/enable

How to get systemd to restart Rails App with Puma

守給你的承諾、 提交于 2019-12-03 16:58:51
问题 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 crashes. To get the deployment setup, I've used this tutorial. I'm also using RVM. The problem I seem to get is to get the service to start Puma. Here's what I've used (service file): [Unit] Description=Puma HTTP Server After=network.target [Service

Rails 4, Puma, Nginx - ActionController::Live Streaming dies after first chunk sent

自作多情 提交于 2019-12-03 12:14:15
Here's a bare-bones Rails 4 project I've set up to troubleshoot my problem: https://github.com/rejacobson/rails4-streamtest I have a route set up at /home/stream that should stream a line of text 5 times in 1 second intervals. def stream 5.times do |n| puts "Streaming: #{n}" response.stream.write "Streaming: #{n+1}" sleep 1 end rescue IOError => e puts 'Connection closed' ensure response.stream.close end When I run puma using tcp://, without nginx, the streaming works perfectly. curl -N http://localhost:3000/home/stream And I get the 5 lines streamed back, no problem. When I introduce nginx,

Error while starting Puma server with workers

孤者浪人 提交于 2019-12-03 11:58:59
I am new to Rails and Puma, so the issue might be too silly with simple solutions, also please guide me if you think i am doing something wrong. I am trying to start the Puma server for my rails with the worker. If i set workers to 0 with puma -w0 the server starts perfectly but if i set worker to 1 or more it gives the following error: E:\RoR_tryouts\ws_13.11.13\todo>puma -w3 [2120] *** SIGUSR2 not implemented, signal based restart unavailable! [2120] *** SIGUSR1 not implemented, signal based restart unavailable! [2120] Puma starting in cluster mode... [2120] * Version 2.7.1, codename: Earl

An unhandled lowlevel error occurred. The application logs may have details

回眸只為那壹抹淺笑 提交于 2019-12-03 11:23:44
问题 I'm tyring to deploy a rails app to a digital ocean droplet and all seems to be configured ok but I get this error: An unhandled lowlevel error occurred. The application logs may have details. I'm not sure what to do as the logs are empty. Here's the nginx config: upstream puma { server unix:///home/yourcv.rocks/shared/tmp/sockets/yourcv.rocks-puma.sock; } server { listen 80 default_server deferred; server_name 127.0.0.1; root /home/yourcv.rocks/current/public; access_log /home/yourcv.rocks

An unhandled lowlevel error occurred. The application logs may have details

夙愿已清 提交于 2019-12-03 01:46:59
I'm tyring to deploy a rails app to a digital ocean droplet and all seems to be configured ok but I get this error: An unhandled lowlevel error occurred. The application logs may have details. I'm not sure what to do as the logs are empty. Here's the nginx config: upstream puma { server unix:///home/yourcv.rocks/shared/tmp/sockets/yourcv.rocks-puma.sock; } server { listen 80 default_server deferred; server_name 127.0.0.1; root /home/yourcv.rocks/current/public; access_log /home/yourcv.rocks/current/log/nginx.access.log; error_log /home/yourcv.rocks/current/log/nginx.error.log info; location ^~

Sidekiq error: could not connect to server: No such file or directory

孤人 提交于 2019-12-02 03:11:27
问题 I am having trouble with my sidekiq, heroku, redistogo, rails 4 configuration. I have 1 dyno and 1 worker on heroku. I am just using the worker for a get request to an external api. Here is the error I get in my Heroku logs: app[worker.1]: could not connect to server: No such file or directory app[worker.1]: connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? app[worker.1]: Is the server running locally and accepting Here is my config/initializers/sidekiq.rb if Rails.env

Using Resque, Puma and Scheduler together on Heroku

那年仲夏 提交于 2019-12-02 00:24:26
After reviewing numerous guides I would like to confirm my setup. Right now my procfile looks like: web: bundle exec puma -C config/puma.rb config.ru resque: TERM_CHILD=1 RESQUE_TERM_TIMEOUT=10 QUEUES=* bundle exec rake resque:work worker: bundle exec rake resque:work COUNT=1 QUEUE=* scheduler: bundle exec rake resque:scheduler ...and in Heroku : ...and my rake resque setup task : require 'resque' require 'resque/tasks' require 'resque/scheduler/tasks' # http://jademind.com/blog/posts/enable-immediate-log-messages-of-resque-workers/ namespace :resque do desc 'Initialize Resque environment'

RoR 5.0.0 ActionCable wss WebSocket handshake: Unexpected response code: 301

醉酒当歌 提交于 2019-12-01 04:44:24
Hello I'm trying to serve a simple chat using ror 5.0.0 beta (with puma) working on production mode (in localhost there are no problems). This is my Nginx configuration: upstream websocket { server 127.0.0.1:28080; } server { listen 443; server_name mydomain; ssl_certificate ***/server.crt; ssl_certificate_key ***/server.key; ssl on; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; access_log /var/log/nginx/jenkins.access.log; location / { proxy_set_header Host

SSE / EventSource closes after first chunk of data (Rails 4 + Puma + Nginx)

自古美人都是妖i 提交于 2019-11-30 17:07:27
问题 I followed the 401-ActionController-Live Railscast and this Blog Post about Server-Sent-Events to set up something similar in my Rails app. It works perfectly when I open connections to the server when only using puma but with puma + nginx , the connection closes after the first chunk of data is sent. I also tried following the solutions provided in these questions but they didn't work for me: ActionController::Live Streaming dies after first chunk sent EventSource / Server-Sent Events