puma

Why I use Rails model concerns will get the superclass mismatch errors with class in production environment?

青春壹個敷衍的年華 提交于 2019-12-12 01:23:23
问题 I use Puma and Rails 4.2. My concern is set up like this: Class Order module Chartable ... end end The order class is set up like this: Class Order include Chartable end In development, the code showed no errors, but in the production I got the error: Unable to load application: TypeError: superclass mismatch for class Order. I don't know why this error happens, and after consulting some documentation, I think the error comes from Puma's set :puma_preload_app, true - is it right? How can I

Heroku: Why so many database connections?

此生再无相见时 提交于 2019-12-11 13:25:38
问题 I'm working on a rails project to act as a server and backend database for an iPhone app. In my attempts to do load testing I started getting errors saying there were too many db:connections and when I checked with pg:info I saw that to be true (Connections: 160/120). This made some sense to me during the test but after it's over it still shows that many open connections which really confuses me. My questions 1) Why are these db connections remaining open after the process is done running? 2)

Can't install Puma gem on windows 8.1 (ruby 2.1.5)

自闭症网瘾萝莉.ら 提交于 2019-12-11 11:07:51
问题 I've been trying for a few days now to install the puma gem for ruby (2.1.5). I've update rubygems, I installed and succesfully ran the devkit, downloaded the latest ssl headers and fed them to the installation but all without success This solution has been opted and I've seen several other ones from Luis Lavena or sourcing from http://rubygems.org instead of https:// but none of them seem to really work for me: https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows

Puma App Instances on Heroku

回眸只為那壹抹淺笑 提交于 2019-12-11 10:07:25
问题 I'm using New Relic for server analytics of a Heroku app. The app uses the Puma web server and MAX_THREADS is set to 1. Why does New Relic says that I've got 4 app instances on each Heroku dyno rather than just 1? web.1 4 app instances web.2 4 app instances worker.1 1 app instance I'm thinking that an "app instance" on New Relic is the same as a thread. Or does it refer to something else? 回答1: App instance means worker. this worker is different with heroku worker. it is process that is forked

Using threadsafe initialization in a JRuby gem

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:55:38
问题 Wanting to be sure we're using the correct synchronization (and no more than necessary) when writing threadsafe code in JRuby; specifically, in a Puma instantiated Rails app. UPDATE: Extensively re-edited this question, to be very clear and use latest code we are implementing. This code uses the atomic gem written by @headius (Charles Nutter) for JRuby, but not sure it is totally necessary, or in which ways it's necessary, for what we're trying to do here. Here's what we've got, is this

Rails 5 production error activesupport

試著忘記壹切 提交于 2019-12-11 06:25:11
问题 i have a 5.0.0.1 project that got problem deploying it. i use capistrano to deploy and it runs puma for me too. puma gets run and "Somthing went wrong" error shows up. And now i have problem running project in my local development, weird! this errors shows up: ‍‍You have already activated activesupport 5.1.2, but your Gemfile requires activesupport 5.0.0.1. Prepending bundle exec to your command may solve this. (Gem::LoadError) And yes im only able to run project locally with bundle exec

After upgrade to Rails 5, app no longer receiving requests

痞子三分冷 提交于 2019-12-11 06:13:16
问题 I updated one of my apps to Rails 5 and upgraded the Ruby version to 2.3.1 as well. The app already used Puma prior to the Rails 5 upgrade as well and was deployed on a Digital Ocean droplet. When I start rails server locally, I get the normal output in my Rails log, which I've copied below. => Booting Puma => Rails 5.0.0 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options [14669] Puma starting in cluster mode... [14669] * Version 3.4

Rails 5 run puma and simple xmlrpc server at the same time

不想你离开。 提交于 2019-12-11 05:28:47
问题 My rails app needs a XMLRPC server. But There when I try: rails s Only XMLRPC server starts and puma does not start. What I have done in my config.rb file is: require_relative 'config/environment' require "xmlrpc/server" server = XMLRPC::Server.new( 1234 ) server.add_handler('my_test.test') { |msg| "responce for #{msg}" } server.serve # HERE IS WHERE APP STUCKS WITH XMLRPC run Rails.application Is there any idea to perform this? 来源: https://stackoverflow.com/questions/38435969/rails-5-run

How to debug an ajax request raising “Error R15 (Memory quota vastly exceeded)”

浪尽此生 提交于 2019-12-11 05:09:34
问题 I have a Rails app on Heroku that is crashing with Error R15 (Memory quota vastly exceeded) . I've tracked this issue to pages that contain several asynchronous requests. The errors appears to coincide with ajax requests to build remote datatables. The problem is, I can't figure out why these errors are being raised. I thought perhaps the databse queries and controller actions behind the ajaxified datatables might be running slowly. But if I examine these in development using miniprofiler,

Rails5 Action Cable Nginx 404 and 502 errors

醉酒当歌 提交于 2019-12-10 23:35:18
问题 Everyone :). I know people have already faced alot of problems related to mine. I have tried all but my issue has not been resolved. I have been working from past 3 days to fix this but I am unable to do it. I am using ActionCable for the first time and on development server it is working fine. But in production where I am using Puma and Nginx I am facing terrible issues. Initially when I had not (location /cable) settings in nginx configuration, server gives me 404 handshake error i.e Error