similar to: Unicorn preload_app and upstart

Displaying 20 results from an estimated 1000 matches similar to: "Unicorn preload_app and upstart"

2011 May 19
2
unicorn doesn't restart properly after cap deploy (not using Bundler)
Hey guys, I''m sending USR2 to unicorn after cap deploy, and the old master is getting replaced by a new master that doesn''t work. Here are some similar threads I found ... http://rubyforge.org/pipermail/mongrel-unicorn/2010-October/000733.html http://rubyforge.org/pipermail/mongrel-unicorn/2010-October/000717.html I''m not using Bundler, and I have working_directory
2013 Sep 20
3
[PATCH] preload_app can take an optional block for warmup
--- lib/unicorn/configurator.rb | 19 ++++++++++++++++--- lib/unicorn/http_server.rb | 3 +++ test/unit/test_configurator.rb | 8 ++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 0d0eac7..a0ae576 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -441,9 +441,22 @@ class
2013 Jan 20
6
preload_app = true causing - ActiveModel::MissingAttributeError: missing attribute: some_attr
Greetings, I''m getting this - ActiveModel::MissingAttributeError: missing attribute: some_attr - on a random basis under a unicorn server, running rails 3.2 and ruby 1.9.3 As the case of the last poster in the following thread - https://github.com/rails/rails/issues/1906 - I too am able to resolve this issue by settingpreload_app to false. However, this is not the behaviour I want to
2011 Apr 25
6
Unicorn / Daemontools
Hi - I tried to get Daemontools and Unicorn working together a while back - there are issues on USR2 restart because of the pid change - I''m hoping someone in the community will have some understanding of this issue I documented my experience and eventual defeat here : http://log.robotarmyma.de/post/2053448029/daemontools-ubuntu-rvm-bundler-unicorn-install Any help would be received
2011 Feb 16
1
Forking for background processing with rails/unicorn
Hello, I''ve been working for a few days on a problem which, after tracking it down, seems to be related to unicorn. I''m hoping that somebody might be able to help with information about what''s going on. In the Rails 3 application that I support, we sometimes fork during a web request in order to do background processing behind the scenes without the user (and the
2010 Sep 09
4
Unicorn fails to restart gracefully on capistrano deploy
First off thanks very much for all the hard work on unicorn. Alas, we''ve encountered an issue where unicorn fails to spawn new workers that have loaded the incoming revision on a capistrano deploy. I''m not entirely sure the issue is due to unicorn as it appears that bundler was responsible for a similar issue in the past:
2010 Nov 09
2
AMQP and Unicorn (mq gem)
Hi all, I''m having issues with Unicorn and connecting to RabbitMQ using the tmm1-amqp gem. I''ve tried lots of approaches. The classic initializer with Thread.new { EM.run } for the Rails app and even tried using the Qusion library. (https://github.com/danielsdeleo/qusion) I''ve made a simple mod to Qusion for it to monkey patch unicorn too. The code looks
2012 Dec 04
2
403 Forbidden from nginx when unicorn started in debug mode
I am using nginx with unicorn as a reverse proxy. Has been fantastic, but needed to look through some code for first time. Using ruby 1.9.3p194 with rails 3.2.9, development mode with ssl enabled, I start unicorn with -d ...and it does not get served up by nginx. Any ideas, or more information needed? Thanks! Jet Below is my unicorn.rb for developent: # config/unicorn.rb env =
2010 Oct 02
2
Unicorn doesn't reload the app after the HUP signal
Hi folks, I''ve experimented a problem while deploying my app, I''ve sent the HUP signal to the master process, I''ve checked everything is ok: new master and workers are spawned and the old ones are killed(I''ve checked the PIDs), but the new code deployed isn''t reflected in the living site, so I''ve to stop and start again unicorn in order to see
2011 Sep 30
3
Multiple rack applications on the same server with unicorn
If I''m running two rails apps on the same server using Unicorn, I have to run two instances of Unicorn, right? If so, then here''s a place where passenger might win in terms of memory use, as the rails code will be loaded into memory twice, right? I''m still probably going with Unicorn, but just exploring this first. Thanks, John
2012 Dec 07
3
Ubuntu upstart
I cannot find any good example of a unicorn upstart task that works properly for the following: * Upstart will restart if unicorn dies * Can send USR2 signal to unicorn to do a no downtime deploys * Able to stop upstart job, even after a deploy I have tried the following: expect fork respawn setuid www-data chdir /var/www/app/current exec bundle exec unicorn_rails -E production -c
2010 Feb 14
6
Nginx Sock And Rails Envinroment Error
Hi There, Im running an amazon instance with nginx proxying to a unicorn sock. For some reason, even though i specify the production environment, when being visited by nginx, the site shows errors in development form. Interestingly, when running on a port rather than a sock, if i visit that port, the errors are rendered as normal with a 500 page, the same port, throught nginx, shows errors
2009 Nov 07
1
Fwd: [PATCH (geoip)] use IO.pread from the io-extra lib if possible
I sent this to the author of geoip a few days ago and haven''t heard back, yet. Since he may be on vacation or busy, somebody may also hit this problem in the mean time, I figured I''d post the patch + git repo I sent him here. Unicorn users: The pread(2)/pwrite(2) syscalls are very useful for making libraries like this one (that rely on an on-disk database) compatible with
2013 May 20
2
Unicorn + RUnit Rails Not Killing Old Master
Hi, I''m deploying Unicorn on a Rails application with RUnit. Technically I''m using Chef''s deployment tools, if any of you are familiar with it (https://github.com/opscode-cookbooks/application_ruby) but to be clear they aren''t doing anything magical, so this is purely an issue with RUnit and Unicorn. The TL;DR of the following post, which has lots of
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
Signaling using normal kill(2) is preserved, but the master now prefers to signal workers using a pipe rather than kill(2). Non-graceful signals (:TERM/:KILL) are still sent using kill(2), as they ask for immediate shutdown. This change is necessary to avoid triggering the ubf (unblocking function) for rb_thread_call_without_gvl (and similar) functions extensions. Most notably, this fixes
2013 Nov 01
7
[PATCH] construct listener_fds Hash in 1.8 compatible way
This renables the ability for Ruby 1.8 environments to perform reexecs --- lib/unicorn/http_server.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 2decd77..9a5795c 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -449,13 +449,14 @@ class Unicorn::HttpServer end
2013 May 25
1
Silent Failure when starting Unicorn on Heroku
Switched my RoR (3.1.3, 1.9.2) app from Thin to Unicorn (4.6.2). It ran fine in development (Mac OSX), but when deploying to production on Heroku, it fails silently (no backtrace, no error detail). Log looks like: Starting process with command `bundle exec unicorn start -p 6069 -c ./config/unicorn.rb` /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:634:in
2012 Apr 27
14
app error: Socket is not connected (Errno::ENOTCONN)
I''m getting the following errors multiple times per request when using 4.3.0. I do not receive any errors when using 4.2.1. Please CC me on replies, I''m not subscribed to the mailing list. 16:48:42 web.1 | E, [2012-04-26T16:48:42.733954 #87940] ERROR -- : app error: Socket is not connected (Errno::ENOTCONN) 16:48:42 web.1 | E, [2012-04-26T16:48:42.734193 #87940] ERROR
2012 Aug 31
1
after_fork - ActiveRecord::AdapterNotSpecified
Hi all, I''m fighting with the after_fork hook and my sinatra application. The Sinatra app is using active_record, In my unciron.rb file I''m using preload_app true after_fork do |server, worker| ? defined?(ActiveRecord::Base) and ??? ActiveRecord::Base.establish_connection End but I always get the error: ERROR -- : ActiveRecord::AdapterNotSpecified
2012 Jan 31
12
FreeBSD jail and unicorn
Hello, I''m using unicorn since a while, but now I try to run it the first time inside a FreeBSD jail. The initial start of unicorn works fine and it serves all the requests. But if I want to restart it using the USR2 signal, it (more or less) slowly starts using more and more CPU cycles. There is no error message in the logs and it quite hard to reproduce that error. In 1 of 20 tries,