unicorn

Large number of threads under unicorn

前提是你 提交于 2019-12-13 01:01:01
问题 I am in the process of debugging some Posgtres connection leaks in our application. Few days back we suddenly crossed 100 connections when we should not be - coz we just have 8 unicorn workers and a sidekiq process (25 threads). I was looking at htop today and saw that a ton of threads were being spawned from my unicorn workers. Eg: Am I reading this correctly? This should not be happening right? If these are threads being spawned, any idea how to debug this? Thanks! Btw, my other problem -

Problems with postgres and Unicorn server

余生颓废 提交于 2019-12-13 00:52:12
问题 When I try running Unicorn after setting up postgres (works perfectly with Trinidad and Thin) I get the following error. dyld: lazy symbol binding failed: Symbol not found: _rb_thread_select Referenced from:/Users/pls/.rvm/gems/ruby-2.2.0@coinino/extensions/x86_64-darwin-13/2.2.0/do_postgres-0.10.14/do_postgres/do_postgres.bundle Expected in: flat namespace Datamapper connects to the database normally inside a model.rb which then is required in app.rb. What is wrong and how do I fix it? Edit:

strange error with devise and unicorn

天涯浪子 提交于 2019-12-13 00:06:36
问题 I used devise with many of my rails apps in development I am getting these error every day 1-2 times NoMethodError: undefined method `users_url' for #<RegistrationsController:0x007f14cd6cd958> .0/gems/turbolinks-2.5.3/lib/turbolinks/ xhr_headers.rb: 21:in `_compute_redirect_to_location' …0224210521/app/controllers/ /home/remmon/apps/myapp/releases/20150224210521/app/controllers/registrations_controller.rb registrations_controller.rb: 26:in `create' …le/ruby/2.1.0/gems/journey-1.0.4/lib

`parse_rackup_file': rackup file (config.ru) not readable (ArgumentError)

╄→гoц情女王★ 提交于 2019-12-12 14:43:21
问题 I have this "web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb" in my procfile. After starting the server i am getting the below error message. foreman start 12:29:20 web.1 | started with pid 4876 12:29:20 web.1 | exited with code 1 12:29:20 system | sending SIGTERM to all processes 12:29:20 | /home/stcadmin/.rvm/gems/ruby-1.9.3-p448@cpi2/gems/unicorn-4.7.0/lib/unicorn/configurator.rb:659:in `parse_rackup_file': rackup file (config.ru) not readable (ArgumentError) 12:29:20 | from /home

Strange issue with unicorn and nginx caused 502 error

亡梦爱人 提交于 2019-12-12 13:58:40
问题 We have Ruby on Rails application, that is running on VPS. This night the nginx went down and responded with "502 Bad Gateway". Nginx error log contained lots of folowing messages: 2013/10/02 00:01:47 [error] 1136#0: *1 connect() to unix:/app_directory/shared/sockets/unicorn.sock failed (111: Connection refused) while connecting to upstream, client: 5.10.83.46, server: www.website.com, request: "GET /resource/206 HTTP/1.1", upstream: "http://unix:/app_directory/shared/sockets/unicorn.sock:

Can't start unicorn, master failed to start, check stderr log for details

会有一股神秘感。 提交于 2019-12-12 08:23:30
问题 I dont know what’s wrong with the unicorn.rb file. my unicorn.rb config is APP_PATH = "/var/www/demo" working_directory APP_PATH stderr_path APP_PATH + "/log/unicorn.stderr.log" stdout_path APP_PATH + "/log/unicorn.stderr.log" pid APP_PATH + "/tmp/pid/unicorn.pid" running nginx successful. sudo servier nginx start sudo unicorn -c /var/www/demo/config/unicorn.rb -D 回答1: The socket is the "file" that nginx and unicorn use as a channel for all communication between them. Where have you defined

rbenv issue: Your Ruby version is 1.9.3, but your Gemfile specified 2.2.0

妖精的绣舞 提交于 2019-12-12 05:27:17
问题 I have a problem with setting Ruby version in a unicorn start script. When I run start script in debug mode I have the following output. vagrant@vagrant-ubuntu-trusty-64:~$ sudo sh -x /etc/init.d/unicorn start + set -e + USAGE=Usage: /etc/init.d/unicorn <start|stop|restart|upgrade|rotate|force-stop> + USER=vagrant + APP_NAME=my_app + APP_ROOT=/vagrant + RAILS_ENV=production + export RBENV_ROOT=/home/vagrant/.rbenv + export PATH=/home/vagrant/.rbenv/bin:/home/vagrant/.rbenv/shims:/usr/local

Paperclip's error on a production server (unicorn)

£可爱£侵袭症+ 提交于 2019-12-11 22:17:48
问题 I use paperclip for upload images for post. For images there is a separate model, and posts has has_many relation. For uploading, http://github.com/Valums-File-Uploader/file-uploader is used. On local machine, all work fine (production and development mode). Production server (ubuntu 12.04) uses unicorn + nginx. And when I'm trying to upload images,I'm getting: Paperclip::AdapterRegistry::NoHandlerError (No handler found for # Unicorn::TeeInput:0x00000005cdd728 @len=619851, @chunked=false,

Custom views not loading in production mode, but load in development

感情迁移 提交于 2019-12-11 20:25:37
问题 I'm creating a completely new frontend for spree (need a custom set of markup and JS, so Deface isn't a good option in this case). The views I override work fine in development but once I load it up in production it starts to load the views from the core and frontend gems All my overrides are located in app/views/spree/... But that is all ignored in production and is loaded from the default gems. I'm running Unicorn and Nginx on top. Anyone have the slightest idea what could be the case? This

Mysql2 Error while accessing rails app via nginx and unicorn

懵懂的女人 提交于 2019-12-11 19:10:10
问题 I have setup my production server and the rails app is deployed using capistrano 3.1 on nginx and unicorn on Ubuntu Server 12.04LTS. The app is working fine when accessed via normal rails server but whenever I try to run the server via unicorn its says that it cant access some tables in the database. Attached is the snapshot of the error and the snapshot of the database queries. 回答1: As noted above in the comments, I cleared the database, the folders and re-ran the deployment after removing