puma

Capistrano doesn't create puma.pid file

故事扮演 提交于 2020-01-04 05:39:09
问题 I use Capistrano to deploy my Rails app. However, when I deploy my application, puma.pid file is not being created, which leads to a problem - I can't restart server or deploy new version with capistrano - capistrano fails to stop puma , because puma.pid don't exests and it assumes no puma processes is running. And I get ADDRESS ALREADY IN USE error when capistrano tries to run another version of puma. Here is my deploy.rb lock '3.4.0' set :application, 'appname' set :repo_url, 'giturl' set

Thin server QUERY_STRING is longer than the (1024 * 10) allowed length

帅比萌擦擦* 提交于 2020-01-04 05:25:25
问题 How can I increase the maximum allowed value for QUERY_STRING using either thin , puma , or unicorn web servers in Rails? I'm attempting to make a POST request to my Rails API that exceeds the limit, and just need to increase the server's maximum threshold Specific error on POST: Invalid request: HTTP element QUERY_STRING is longer than the (1024 * 10) allowed length. I only came across this question in one other place (HTTP query string length with thin web server) and I couldn't quite make

puma.sock missing in ec2 server after capistrano deployment

寵の児 提交于 2020-01-04 02:12:09
问题 I am getting the following error in the nginx error logs after deploying production a ruby on rails project through capistrano to an instance on ec2. The amazon public host shows a 502 Bad Gateway nginx/1.10.0 (Ubuntu). I followed the tutorial from https://www.sitepoint.com/deploy-your-rails-app-to-aws/ It seems the puma.sock is not being created when I run cap production deploy.. 2017/06/28 01:09:57 [crit] 12802#12802: *1 connect() to unix:/home/deploy/app_name/shared/tmp/sockets/puma.sock

How can I configure puma when running Capybara?

被刻印的时光 ゝ 提交于 2020-01-01 08:45:12
问题 I'd like to adjust the puma configuration when running Capybara tests. Changing settings in .env, .env.test (I use dotenv), or config/puma.rb has no effect. Where can I change the configuration? Rails 5.1, poltergeist 1.15.0, capybara 2.14.0, puma 2.8.2 回答1: Generally with Capybara you configure the server in a register_server block. The :puma server definition Capybara provides is Capybara.register_server :puma do |app, port, host| require 'rack/handler/puma' Rack::Handler::Puma.run(app,

Login User into Websphere Portal without password using PUMA

浪尽此生 提交于 2019-12-25 07:59:27
问题 I want to use facebook to login into Websphere Portal. I use facebook ID to retrieve LDAP uid, but cannot get password. What API can I use to login to portal without password? Here is my code: Context ctx = new InitialContext(); PortletServiceHome pumaHomeService = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome"); PumaHome pumaHome = pumaHomeService.getPumaService().getPortletService(PumaHome.class); PumaLocator pumaLocator = pumaHome.getLocator

puma server silently crashes in production without log?

≡放荡痞女 提交于 2019-12-25 03:16:24
问题 Time to time when i access the production site the site is down. I dont know how much time it has been down for. I then ssh to the production server and check the logs and the logs has no record of when the puma was down. I do grep 'puma shutdown:' puma.error.log to see all instances of when puma was shutdown === puma shutdown: 2018-03-18 15:44:20 +0545 === === puma shutdown: 2018-04-27 15:22:14 +0545 === === puma shutdown: 2018-04-28 18:27:26 +0545 === === puma shutdown: 2018-05-08 17:45:37

can't connect rails puma server with nginx reverse proxy

谁说胖子不能爱 提交于 2019-12-25 01:35:07
问题 Hello I am trying to setup a reverse proxy with nginx and docker container rails app, public static files are served correctly but can not access to my app. the nginx error log says: 2018/12/08 16:46:45 [error] 4093#4093: *350 could not find named location "@puma", client: xx.xxx.xxx.xx, server: my.app, request: "GET /en/users/sign_in HTTP/2.0",host: "my.app", referrer: "https://my.app/" my nginx config is this: upstream puma { server 0.0.0.0:3000; } server { listen 443 ssl http2; listen [::]

puma initializer does not work with rails 4.2

可紊 提交于 2019-12-24 03:53:23
问题 I have installed puma many times before and have never had this problem. I am following heroku's instructions verbatim. I have created a Procfile with this inside: web: bundle exec puma -C config/puma.rb Here is the configuration file puma.rb: workers Integer(ENV['WEB_CONCURRENCY'] || 2) threads_count = Integer(ENV['MAX_THREADS'] || 5) threads threads_count, threads_count preload_app! rackup DefaultRackup port ENV['PORT'] || 3000 environment ENV['RACK_ENV'] || 'development' on_worker_boot do

puma initializer does not work with rails 4.2

橙三吉。 提交于 2019-12-24 03:53:13
问题 I have installed puma many times before and have never had this problem. I am following heroku's instructions verbatim. I have created a Procfile with this inside: web: bundle exec puma -C config/puma.rb Here is the configuration file puma.rb: workers Integer(ENV['WEB_CONCURRENCY'] || 2) threads_count = Integer(ENV['MAX_THREADS'] || 5) threads threads_count, threads_count preload_app! rackup DefaultRackup port ENV['PORT'] || 3000 environment ENV['RACK_ENV'] || 'development' on_worker_boot do

`rails server puma` vs. `puma`

喜欢而已 提交于 2019-12-23 10:07:35
问题 Some guides (example) recommend this to start one's webserver bundle exec rails server puma But I've always just started the server with puma directly bundle exec puma Does something special happening when firing up puma (or any other server) via rails server ? 回答1: When you use rails s <server> , the server is launched from the Rails command and is aware of the Rails environment. This makes possible, for example, to use any of the features and flags offered by the rails server command .