puma

Cannot install Puma gem on Ruby on Rails

落花浮王杯 提交于 2019-11-27 21:56:31
I'm trying to install the puma gem, but when I run gem install puma I get this error message: Temporarily enhancing PATH to include DevKit Building native extensions. This could take a while... ERROR: Error installing puma: ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe extconf.rb creating Makefile make generating puma_http11-i386-mingw32.def compiling http11_parser.c ext/http11/http11_parser.rl: In function 'puma_parser_execute': ext/http11/http11_parser.rl:111:3: warning: comparison between signed and unsigned integer expressions compiling io_buffer.c io_buffer.c: In

Is puma the ONLY multi-threaded rails 4 http server?

孤街浪徒 提交于 2019-11-27 13:34:55
I've gotten our stack converted to Rails 4 (yea!) and I'm looking to take advantage of the thread-safe code. Puma works in getting up, stopping it appears to be a different problem :( Is Puma the only multi-threaded rails? Thin -> EventMachine Unicorn -> Forking Puma -> multi-threaded Mongrel -> don't care Webbrick -> don't care No. In alphabetical order: Iodine a HTTP / Websocket Server & EventMachine alternative (kqueue/epoll based) Net::HTTP::Server , despite the lack of advertising, supports multithreading Phusion Passenger has supported multithreading since v4 beta Rainbows! supports

How do I use puma's configuration file?

烈酒焚心 提交于 2019-11-27 11:28:19
问题 I was following this guide it documents the puma.rb file that is stored inside the app's config directory. The guide is a bit flakey, but here's what I assume the puma.rb file does. Instead of running crazy commands such as this to get puma running on a specified socket: bundle exec puma -e production -b unix:///var/run/my_app.sock You can just specify the port, pid, session and other parameters in the puma.rb file like this: rails_env = ENV['RAILS_ENV'] || 'production' threads 4,4 bind "

What is the difference between Workers and Threads in Puma

强颜欢笑 提交于 2019-11-27 10:15:01
问题 What is the difference between a puma worker and a puma thread in context of a heroku dyno? What I know (please correct me if I am wrong): Thin is not concurrent, so a web process can only do one request at a time In unicorn, I know I can have several unicorn workers in one process to add concurrency. But in puma there is threads and workers.. Isn't a worker a thread inside the puma process? Can I use more workers/threads to add web concurrency in Heroku? 回答1: As the other answer states, this

Is puma the ONLY multi-threaded rails 4 http server?

我是研究僧i 提交于 2019-11-27 04:04:18
问题 I've gotten our stack converted to Rails 4 (yea!) and I'm looking to take advantage of the thread-safe code. Puma works in getting up, stopping it appears to be a different problem :( Is Puma the only multi-threaded rails? Thin -> EventMachine Unicorn -> Forking Puma -> multi-threaded Mongrel -> don't care Webbrick -> don't care 回答1: No. In alphabetical order: Iodine a HTTP / Websocket Server & EventMachine alternative (kqueue/epoll based) Net::HTTP::Server , despite the lack of advertising,

NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream

柔情痞子 提交于 2019-11-27 02:56:54
I have Puma running as the upstream app server and Riak as my background db cluster. When I send a request that map-reduces a chunk of data for about 25K users and returns it from Riak to the app, I get an error in the Nginx log: upstream timed out (110: Connection timed out) while reading response header from upstream If I query my upstream directly without nginx proxy, with the same request, I get the required data. The Nginx timeout occurs once the proxy is put in. **nginx.conf** http { keepalive_timeout 10m; proxy_connect_timeout 600s; proxy_send_timeout 600s; proxy_read_timeout 600s;

How can I serve requests concurrently with Rails 4?

时光毁灭记忆、已成空白 提交于 2019-11-27 00:35:35
问题 I'm trying to serve multiple requests concurrently in Rails 4, something I was able to do very easily with config.threadsafe! and Puma in Rails 3. Say I have this controller class ConcurrentController < ApplicationController def index sleep 10000 end def show end end I used to be able to just start puma with puma -t 2:16 -p 3000 (for min 2 threads) and hit index and then show and still have show render properly. In Rails 4, if I attempt to do the same thing Puma now locks on the index request

NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream

ε祈祈猫儿з 提交于 2019-11-26 11:54:07
问题 I have Puma running as the upstream app server and Riak as my background db cluster. When I send a request that map-reduces a chunk of data for about 25K users and returns it from Riak to the app, I get an error in the Nginx log: upstream timed out (110: Connection timed out) while reading response header from upstream If I query my upstream directly without nginx proxy, with the same request, I get the required data. The Nginx timeout occurs once the proxy is put in. **nginx.conf** http {