Re: A barrage of unexplained timeouts

2013-08-20 Thread Eric Wong
n...@auger.net wrote: > We've been running unicorn-3.6.2 on REE 1.8.7 2011.12 in production > for quite some time and we use monit to monitor each unicorn worker. > Occasionally, I'll get a notification that a worker has timed-out and > has been re-spawned. In all these cases, when I look at the r

[PATCH 1/2] http_server: improve handling of client-triggerable socket errors

2013-08-16 Thread Eric Wong
We do not attempt to write HTTP responses for socket errors if clients disconnect from us unexpectedly. Additionally, we do not hide backtraces EINVAL/EBADF errors, since they are indicative of real bugs which must be fixed. We do continue to hide hide EOF, ECONNRESET, ENOTCONN, and EPIPE because

[PATCH 2/2] test_util: fix encoding test for Ruby trunk (2.1.0dev)

2013-08-16 Thread Eric Wong
As of r40610 in ruby trunk, internal encoding is ignored if external coding is ASCII-8BIT (binary) ref: r40610 http://svn.ruby-lang.org/repos/ruby/trunk --- test/unit/test_util.rb | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/unit/test_util.rb b/test/unit/tes

[PATCH 0/2] minor improvements pushed to unicorn.git

2013-08-16 Thread Eric Wong
9af083d7f6b97c0f5ebbdd9a42b58478a6f874b7: test_util: fix encoding test for Ruby trunk (2.1.0dev) (2013-08-17 01:09:46 +) Eric Wong (2): http_server: improve handling of client-triggerable socket errors test_util: fix encoding test for Ruby

Re: [PATCH] http_response: reattempt writing body chunks to the socket under situations of high EINVAL/EAGAIN load.

2013-08-15 Thread Eric Wong
Tim Snowhite wrote: > We run Unicorn with ruby 1.8.7 on FreeBSD and began experiencing many > early terminations of the body stream when attempting to transfer > files over a couple hundred Kb. The body stream would terminate with > …data…HTTP 1.1 500 Internal Service Error, due to raising an > Er

Re: unicorn upstart script

2013-08-09 Thread Eric Wong
Josh Sharpe wrote: > I haven't seen my mailing list request confirmed. Please CC me your > responses - thanks! Done! (I think the confirmation should've gone through, Rubyforge has been acting funny...). Anyways it's common practice on many FOSS mailing lists to Cc: all parties (but not Ruby-r

Re: [PATCH] unicorn_forever: new executable to respawn masters

2013-08-03 Thread Eric Wong
Jeremy Lecour wrote: > > This may be useful for daemontools and similar init replacements > > which behave badly when the master process is replaced during the > > normal SIGUSR2 && SIGQUIT routine. > > Does Monit fall into this category of tools? > > Each time I restart a master process I have

Re: Increassing timeouts

2013-08-03 Thread Eric Wong
Troex Nevelin wrote: > On Jan 15, 2013, at 21:44 , Eric Wong wrote: > > But seriously, who will wait 120s for a website to load? > > I have similar situation, in my case it's admin interface so admin > knows that some operations need time to process and will wait. > &

[PATCH] unicorn_forever: new executable to respawn masters

2013-08-02 Thread Eric Wong
Comments/reports of success/failure appreciated. (Bcc-ing the user who contacted me privately about daemontools :) 8<-- From: Eric Wong Subject: [PATCH] unicorn_forever: new executable to respawn masters Warning: lightly tested (

how many Ruby 1.8 users left?

2013-08-02 Thread Eric Wong
Hi all, just wondering how many users are still on Ruby 1.8. unicorn still supports 1.8 for now, but going 1.9.3+ (or even 2.0.0+) will allow us to kill some old code we've been keeping around... Fwiw, "enterprise" distros (e.g. CentOS 6.x) will remain supported by their distributors for many yea

[ANN] unicorn 4.6.3 - fix --no-default-middleware option

2013-06-21 Thread Eric Wong
Changes: Thanks to Micah Chalmer for this fix. There are also minor documentation updates and internal cleanups. Eric Wong (4): doc: update documentation for systemd + PrivateTmp users test_signals: increase delay between Process.kill HttpParser#next? becomes

Re: PID files not being removed on shutdown

2013-06-18 Thread Eric Wong
Jon Wood wrote: > Hello, > > I'm quite consistently seeing an issue where Unicorn leaves its PID > files in place after a clean shut down, which is causing some issues > when deploying releases that update Unicorn config. > > We're doing hot restarts with USR2+QUIT, and using Upstart for process

Re: HEAD responses contain body

2013-06-13 Thread Eric Wong
Jonathan Rudenberg wrote: > On Jun 13, 2013, at 2:22 PM, Eric Wong wrote: > > Jonathan Rudenberg wrote: > >> RFC 2616 section 9.4[1] states: > >> > >>> The HEAD method is identical to GET except that the server MUST NOT > >>> return a mess

Re: HEAD responses contain body

2013-06-13 Thread Eric Wong
Jonathan Rudenberg wrote: > On Jun 13, 2013, at 3:21 PM, Eric Wong wrote: > > Try the following: > Thanks, this stack works. Good to know! > > I added the Rack::ContentLength (it's already in the default middleware > > stack) since I believe Rack::Chunked add

Re: HEAD responses contain body

2013-06-13 Thread Eric Wong
Jonathan Rudenberg wrote: > RFC 2616 section 9.4[1] states: > > > The HEAD method is identical to GET except that the server MUST NOT return > > a message-body in the response. > > A HEAD request against this simple Rack app running on unicorn-4.6.2: > > require 'rack' > + use Rack::

Re: [PATCH 1/2] Integration test for --no-default-middleware option

2013-06-07 Thread Eric Wong
he :no_default_middleware option was set from the lambda could not detect anything. This patch copies it to a local variable that won't get clobbered, restoring the feature. [ew: squashed test commit into the fix, whitespace fixes] Signed-off-by: Eric Wong --- lib/unicorn.rb

Re: Unicorn freezes, requests got stuck in the queue most likely

2013-05-29 Thread Eric Wong
Btw, I (and I'm sure other readers) would be interested in what your diagnosis/resolution is, regardless of whether it's a problem with unicorn or anything else. ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinf

Re: Unicorn freezes, requests got stuck in the queue most likely

2013-05-28 Thread Eric Wong
Alexander Dymo wrote: > In short: > - we have two groups of workers: > - one serving long-running requests that take more than 10 sec, listening > to a '/tmp/long_requests_unicorn.sock' socket > - another serving normal requests, listening to '/tmp/unicorn.sock' socket > - nginx determines wh

Re: Unicorn + RUnit Rails Not Killing Old Master

2013-05-20 Thread Eric Wong
Graham Christensen wrote: > 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

Re: Growing memory use of master process

2013-05-15 Thread Eric Wong
Andrew Stewart wrote: > On Wed, May 15, 2013, at 11:28 AM, Eric Wong wrote: > > If you're using preload_app, I suspect it's some background thread > > or hook causing it. Otherwise, can you reproduce this with a barebones > > application? > > Do you mean so

Re: Growing memory use of master process

2013-05-15 Thread Eric Wong
Andrew Stewart wrote: > I was wondering why my Unicorn master process's memory use grows over > time. > > As as I understand it, when I (re)start Unicorn a master process spins > up which loads my Rails app. The master process then brings up worker > processes which handle traffic to the app. C

Re: add HTTP response headers

2013-05-12 Thread Eric Wong
pille wrote: > hi, > > is it possible to add static and dynamic HTTP response headers in > unicorn.conf.rb? No, but it is easily possible with a Rack config.ru > i'd like to add the hostname of the worker for debugging and a > timestamp, when the request was worked on. > > currently this is do

[PATCH] HttpParser#next? becomes response_start_sent-aware

2013-05-08 Thread Eric Wong
STS_DEFAULT assert HttpParser::KEEPALIVE_REQUESTS_DEFAULT >= 0 -- Eric Wong ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

[PATCH] test_signals: increase delay between Process.kill

2013-05-03 Thread Eric Wong
{ sock.syswrite(buf) } Process.kill(:KILL, killer) -- Eric Wong ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

Re: Why doesn't SIGTERM quit gracefully?

2013-04-25 Thread Eric Wong
Andreas Falk wrote: > On Thu, Apr 25, 2013 at 10:51 AM, Eric Wong wrote: > > Andreas Falk wrote: > >> I'm wondering why SIGINT and SIGTERM both were chosen for the quick > >> shutdown? I agree with SIGINT but not with SIGTERM. A lot of unix > >> tools s

Re: Why doesn't SIGTERM quit gracefully?

2013-04-25 Thread Eric Wong
Andreas Falk wrote: > I'm wondering why SIGINT and SIGTERM both were chosen for the quick > shutdown? I agree with SIGINT but not with SIGTERM. A lot of unix > tools send SIGTERM as default (kill, runit among some) and it seems to > be the standard way of telling a process to quit gracefully but n

Re: Worker Timeout Debugging

2013-04-19 Thread Eric Wong
Eric Wong wrote: > If you're using Ruby 1.9 or later, maybe sending SIGBUS/SIGSEGV can work > to trigger a Ruby core dump. > > Do not attempt to install SIGSEGV/BUS handler(s) via Ruby, Ruby 1.9 > already handles those internally. Ruby 2.0.0 prevents trapping SEGV/BUS >

Re: Worker Timeout Debugging

2013-04-19 Thread Eric Wong
Bill Vieux wrote: > I am getting occasional worker timeouts for a Rails app hosted on > Heroku. I have rack-timeout set at the top of the middleware with a > shorter timeout than unicorn workers, but it is not firing for some > reason. Which version of Ruby is this and what C extensions are you u

Re: Fedora Unix socket file location problems

2013-04-05 Thread Eric Wong
our problem, but I'll bet that more than a few Fedora users are > using TCP sockets instead of unix sockets with Unicorn because of > this. Thanks, I'll queue up something like the following patch. Comments/corrections greatly appreciated: --

Re: Can Unicorn Listen to an Existing Socket Descriptor?

2013-04-04 Thread Eric Wong
Jacob wrote: > I know that Unicorn opens and shares it's bound socket amongst its > sub-processes, however I was hoping I could also pre-open a socket to > be handed off to Unicorn. Yes, but unicorn has this feature to support in-place upgrades (SIGUSR2). You still need to tell unicorn about the

Re: Unicorn hangs on POST request

2013-04-03 Thread Eric Wong
"Lin Jen-Shin (godfat)" wrote: > On Wed, Apr 3, 2013 at 6:36 AM, Eric Wong wrote: > > Fwiw, Cool.io works pretty well in my experience. > [...] > > I can also help fix Cool.io bugs since it's written in C, but I can't > > fix EM bugs: C++ is too b

Re: Unicorn hangs on POST request

2013-04-02 Thread Eric Wong
Tom Pesman wrote: > > Probably not, at least it won't improve _consistency_ of performance > > without changing your app. > > > > The problem with buffering in Rainbows!+EM is the buffering happens after > > the work is distributed to different worker processes (Rainbows!+EM is > > still single-th

Re: Unicorn hangs on POST request

2013-04-02 Thread Eric Wong
Tom Pesman wrote: > > The request body doesn't seem to be there, presumably because Heroku > > isn't sending it. > > > > Doe heroku fully buffer the request body before sending it to unicorn? > > nginx fully buffers, and this is why I can only recommend nginx for slow > > clients. > > > > The prox

Re: Signing the gem with a PGP key

2013-03-11 Thread Eric Wong
Hongli Lai wrote: > On Mon, Mar 11, 2013 at 11:48 PM, Eric Wong wrote: > > Can we designate gems be signed by a trusted third party (e.g. you?) > > That's how Debian (and presumably other OS distros work). > > > > _Nobody_ should trust me. I have and maintai

Re: Unicorn hangs on POST request

2013-03-11 Thread Eric Wong
Tom Pesman wrote: > > Tom Pesman wrote: > >> Eric Wong wrote: > >> > Tom Pesman wrote: > >> >> I'm trying to fix a problem I'm experiencing with my Rails > >> >> application hosted at Heroku. I've one POST reques

Re: Signing the gem with a PGP key

2013-03-11 Thread Eric Wong
Hongli Lai wrote: > After the recent Rubygems.org hack it became clear that somethings > needs to be done about authenticating gems. One of the efforts that > was launched is http://www.rubygems-openpgp-ca.org/. We at Phusion > have just finished signing all our gems and repositories with our PGP

Re: Unicorn hangs on POST request

2013-03-11 Thread Eric Wong
Tom Pesman wrote: > Eric Wong wrote: > > Tom Pesman wrote: > >> I'm trying to fix a problem I'm experiencing with my Rails > >> application hosted at Heroku. I've one POST request which hangs and > >> with the help of a customized rack-timeout

Re: Unicorn hangs on POST request

2013-03-09 Thread Eric Wong
Tom Pesman wrote: > Hello, > > I'm trying to fix a problem I'm experiencing with my Rails > application hosted at Heroku. I've one POST request which hangs and > with the help of a customized rack-timeout gem > (https://github.com/tompesman/rack-timeout) I managed to get a > stacktrace: https://g

Re: Why so many worker threads?

2013-03-01 Thread Eric Wong
Alexey Chernenkov wrote: > 2013/3/1 Eric Wong : > > Alexey Chernenkov wrote: > >> > >> Can anyone explain why my Unicorn installation (for RoR site) have so > >> many worker threads? > >> * screenshot: http://i.stack.imgur.com/U9TFR.png >

Re: Why so many worker threads?

2013-03-01 Thread Eric Wong
Alexey Chernenkov wrote: > Hello! > > Can anyone explain why my Unicorn installation (for RoR site) have so > many worker threads? > > * screenshot: http://i.stack.imgur.com/U9TFR.png > * unicorn.rb: https://gist.github.com/907th/4995323 It's probably some gem/library you're using which spa

Re: Unicorn on shared apps platform

2013-02-26 Thread Eric Wong
Hongli Lai wrote: > On Tue, Feb 26, 2013 at 6:26 PM, Eric Wong wrote: > > That's not true, Rainbows! was designed to serve clients directly. > > On the other hand, I do not know if anybody uses Rainbows! that way > > (or at all in production). > > I didn't

Re: Unicorn on shared apps platform

2013-02-26 Thread Eric Wong
Hongli Lai wrote: > On Tue, Feb 26, 2013 at 4:08 PM, Amol Dev wrote: > > We are hosting multiple Rails applications on same server and using > > Passenger + Apache. I can see Unicorn be useful for seamless > > deploys, few questions running it on Rails platform with 50+ rails > > apps: > Rainbow

[ANN] unicorn 4.6.2 - HTTP parser fix for Rainbows!

2013-02-25 Thread Eric Wong
Changes: This release fixes a bug in Unicorn::HttpParser#filter_body which affected some configurations of Rainbows! There is also a minor size reduction in the DSO. (this parser fix only affects Ruby 2.0.0 with Rainbows!) * http://unicorn.bogomips.org/ * mongrel-unicorn@rubyforge.org * git://b

[PATCH] http: avoid frozen string bug in filter_body

2013-02-25 Thread Eric Wong
Eric Wong wrote: > I'm stumped that rb_str_modify() doesn't seem to help with > rb_str_set_len() raising in the chunked parser. More info here: > > https://bugs.ruby-lang.org/issues/7957 > > Any help would be appreciated... It's way past my bed time. Oops, my

weird C extension bug from Ruby 2.0.0-p0

2013-02-25 Thread Eric Wong
I'm stumped that rb_str_modify() doesn't seem to help with rb_str_set_len() raising in the chunked parser. More info here: https://bugs.ruby-lang.org/issues/7957 Any help would be appreciated... It's way past my bed time. ___ Unicorn mailing list - mon

[ANN] unicorn 4.6.1 - minor cleanups

2013-02-21 Thread Eric Wong
Changes: Unicorn::Const::UNICORN_VERSION is now auto-generated from GIT-VERSION-GEN and always correct. Minor cleanups for hijacking. * http://unicorn.bogomips.org/ * mongrel-unicorn@rubyforge.org * git://bogomips.org/unicorn.git * http://unicorn.bogomips.org/NEWS.atom.xml __

Re: Changing Ruby version

2013-02-14 Thread Eric Wong
Jérémy Lecour wrote: > Hi, > > I'm using Unicorn with rbenv to have different Ruby versions between projects. > > This morning, I wanted to change the Ruby version used by an app. > I've updated the content of .ruby-version, then sent a USR2 signal to > the master process to restart Unicorn (as

[PATCH 2/2] http_request: drop conditional assignment for hijack

2013-02-08 Thread Eric Wong
As far as I can tell, this was never necessary. --- lib/unicorn/http_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 681c0ca..6b20431 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_reque

What's cooking in unicorn.git

2013-02-08 Thread Eric Wong
I've pushed out a few minor changes to master, nothing major. git clone git://bogomips.org/unicorn.git Eric Wong (3): auto-generate Unicorn::Const::UNICORN_VERSION http_request: remove FIXME for rack.version clarification http_request: drop conditional assignmen

[PATCH 1/2] http_request: remove FIXME for rack.version clarification

2013-02-08 Thread Eric Wong
commit a9474624a148fe58e0944664190b259787dcf51e in rack.git --- lib/unicorn/http_request.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 3795b3b..681c0ca 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request

[PATCH] auto-generate Unicorn::Const::UNICORN_VERSION

2013-02-08 Thread Eric Wong
ng GIT-VERSION-GEN. This should work: - 8< -- >From cb0623f25db7f06660e563e8e746bfe0ae5ba9c5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 8 Feb 2013 18:50:07 + Subject: [PATCH] auto-generate Unicorn::Const::UNICORN_VERSION This

[ANN] unicorn 4.6.0 - hijacking support

2013-02-06 Thread Eric Wong
Changes: This pre-release adds hijacking support for Rack 1.5 users. See Rack documentation for more information about hijacking. There is also a new --no-default-middleware/-N option for the `unicorn' command to ignore RACK_ENV within unicorn thanks to Lin Jen-Shin. There are only documentation

Re: [ANN] unicorn 4.6.0pre1 - hijacking support!

2013-02-04 Thread Eric Wong
Anybody running 4.6.0pre1, yet? I'm tempted to release 4.6.0 soon. I just pushed out a couple of *BSD-related test fixes ported over from rainbows.git (@ git://bogomips.org/rainbows.git ) commit 9cd8554749a9f120b010c93933d09d2dd27b1280 Author: Eric Wong Date: Mon Feb 4 12:39:09

[PATCH] manpage: update middleware-related documentation

2013-01-29 Thread Eric Wong
-N/--no-default-middleware needs a corresponding manpage entry. Additionally, the Rack::Chunked/ContentLength middleware comment is out-of-date as of unicorn v4.1.0 --- Also just pushed this to master of git://bogomips.org/unicorn commit 64765b95df06256d39daefdeebde97c874770131 Documentation

[ANN] unicorn 4.6.0pre1 - hijacking support!

2013-01-29 Thread Eric Wong
Installing from RubyGems.org: gem install --pre unicorn >From db919d18e01f6b2339915cbd057fba9dc040988b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 29 Jan 2013 21:02:55 + Subject: [PATCH] unicorn 4.6.0pre1 - hijacking support This pre-release adds hijacking support for Rack 1.5 us

Re: [PATCH] Add -N or --no-default-middleware option.

2013-01-28 Thread Eric Wong
Eric Wong wrote: > Lin Jen-Shin wrote: > > + opts.on("-N", "--no-default-middleware", > > + "no default middleware even if RACK_ENV is development") do |e| > > RACK_ENV=deployment also loads middleware, so I think it's more accur

Re: [PATCH] Add -N or --no-default-middleware option.

2013-01-28 Thread Eric Wong
Lin Jen-Shin wrote: > + opts.on("-N", "--no-default-middleware", > + "no default middleware even if RACK_ENV is development") do |e| RACK_ENV=deployment also loads middleware, so I think it's more accurate with: do not load middleware implied by RACK_ENV This also puts us back

Re: No middleware without touching RACK_ENV

2013-01-28 Thread Eric Wong
"Lin Jen-Shin (godfat)" wrote: > And should I send patches for rainbows and zbatery as well? Yes please, thanks! ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like

Re: No middleware without touching RACK_ENV

2013-01-28 Thread Eric Wong
"Lin Jen-Shin (godfat)" wrote: > On Sat, Jan 26, 2013 at 2:39 AM, Eric Wong wrote: > > Doesn't Rails favor RAILS_ENV over RACK_ENV? unicorn ignores RAILS_ENV > > (unicorn_rails respects RAILS_ENV, but unicorn_rails isn't recommended > > for modern (Rac

Re: No middleware without touching RACK_ENV

2013-01-25 Thread Eric Wong
"Lin Jen-Shin (godfat)" wrote: > Hi, > > This might be a bit silly, but finally I decided to bring this up. > > We're running a Rails app along with another Rack app in > the same config.ru, and what I want to do is telling Unicorn > that we don't want any middleware which Unicorn might > insert

Re: SIGSEGV at shutdown (was: Re: your mail)

2013-01-24 Thread Eric Wong
Charles Hornberger wrote: > On Mon, Jan 21, 2013 at 11:28 AM, Eric Wong wrote: > > Charles Hornberger wrote: > >> E, [2013-01-18T17:54:21.502915 #59285] ERROR -- : reaped > >> # worker=1 > >> I, [2013-01-18T17:54:21.605077 #59285] INFO -- : master compl

[PATCH 2/1] ignore normal Rack response at request-time hijack

2013-01-22 Thread Eric Wong
t;check request hijack" && { - test "xhijack.OK" = x"$(curl -sSfv http://$listen/hijack_req)" + test "xrequest.hijacked" = x"$(curl -sSfv http://$listen/hijack_req)" } t_begin "check response hijack" && { -- Eric W

Re: Pull Request For Timeout Handling

2013-01-22 Thread Eric Wong
(moving to public list, since this pull request (and your email address) was already public) Daisuke Taniwaki wrote: > Hi, > > I mistakenly send pull request to the mirror on github. For public patches/pull-requests, please use the public mailing list in the future. See the HACKING doc, subm

[PATCH] support for Rack hijack in request and response

2013-01-22 Thread Eric Wong
.23a9ee4 --- /dev/null +++ b/t/t0200-rack-hijack.sh @@ -0,0 +1,27 @@ +#!/bin/sh +. ./test-lib.sh +t_plan 5 "rack.hijack tests (Rack 1.5+ (Rack::VERSION >= [ 1,2]))" + +t_begin "setup and start" && { + unicorn_setup + unicorn -D -c $unicorn_config h

Re: your mail

2013-01-21 Thread Eric Wong
Charles Hornberger wrote: > Hi! > > I recently noticed this error message when restarting unicorn after a > code deployment (and I don't think I recall having seen it before): > > I, [2013-01-18T17:54:21.502554 #59285] INFO -- : reaped > # worker=6 > I, [2013-01-18T17:54:21.502692 #59285] INFO

Re: preload_app = true causing - ActiveModel::MissingAttributeError: missing attribute: some_attr

2013-01-20 Thread Eric Wong
Avner Cohen wrote: > Eric, > Thanks for the quick reply, and aplogies for not providing full info. > I do have these set up, here is my full configuration: > > # -*- encoding : utf-8 -*- > worker_processes 4 > working_directory "." > listen 3000 > timeout 120 > > preload_app true > > before_for

Re: preload_app = true causing - ActiveModel::MissingAttributeError: missing attribute: some_attr

2013-01-20 Thread Eric Wong
Avner Cohen wrote: > 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/is

Re: Increassing timeouts

2013-01-16 Thread Eric Wong
In case you missed it, I responded to your original message: http://mid.gmane.org/20130115194408.ga30...@dcvr.yhbt.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (

Re: Increassing timeouts

2013-01-15 Thread Eric Wong
Manuel Palenciano Guerrero wrote: > Hello there > > We use Unicorn in all of our production/staging web-apps, and we are > very happy with it. But we also have one of the apps talking to a > web-service via SOAP, and this web-service now takes longer than usual > processing requests. To solve thi

Re: superclass mismatch for class TeeInput?

2012-12-26 Thread Eric Wong
Julian Dunn wrote: > > I was trying to run Unicorn 4.5.0's tests and I'm getting this. Am I doing > > something wrong? > > > > [vagrant@localhost unicorn-4.5.0]$ testrb -Ilib -Iext/unicorn_http -I. test I'm not sure what testrb is doing, I never use it. I can reproduce your error and it's not o

Re: Ubuntu upstart

2012-12-07 Thread Eric Wong
Owen Davies wrote: > 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 I don't think you can combine the first two items. Sending QUIT to th

[ANN] unicorn 4.5.0 (final) - check_client_connection option

2012-12-07 Thread Eric Wong
! compatibility in 4.5.0pre1. * http://unicorn.bogomips.org/ * mongrel-unicorn@rubyforge.org * git://bogomips.org/unicorn.git * http://unicorn.bogomips.org/NEWS.atom.xml -- Eric Wong ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http

Re: Maintaining capacity during deploys

2012-12-07 Thread Eric Wong
Tony Arcieri wrote: > Here's a quick followup with what we're going to try: > > We changed the before_fork/after_fork hooks, getting rid of the > original before_fork hook which sent SIGQUIT to the old master. > Instead, we send SIGTTOU to the old master at the very end of the > after_fork block,

Re: Unicorn fails to install even though it's already installed and running

2012-12-06 Thread Eric Wong
Mac Martine <99mi...@gmail.com> wrote: > Thanks, > > I can install other gems just fine in the same way, so it doesn't seem > like permissions then, right? > > And disk space looks ok: That's good to know. > Here's the end of mkmf.log > > have_macro: checking for SIZEOF_SIZE_T in ruby.h... ---

Re: Unicorn fails to install even though it's already installed and running

2012-12-06 Thread Eric Wong
Mac Martine <99mi...@gmail.com> wrote: > I'm deploying a Rails 3.2.8 app to Ubuntu. The server already runs the app > with Unicorn and Nginx. > unicorn -v returns unicorn v4.4.0 > > Adn rvm gem list shows: > unicorn (4.4.0) > > Yet when I manually run 'gem install unicorn '4.4.0' it fails with

Re: Fwd: Issue starting unicorn with non-ActiveRecord Rails app

2012-12-04 Thread Eric Wong
Peter Hall wrote: > Hi, > > I'm trying to use unicorn in a test deployment of a Rails app that > uses Mongoid, so Activerecord isn't included in the app. When I start > unicorn through Capistrano though, the stderr log fills up endlessly > with identical ActiveRecord-related errors: > > I, [2012

Re: 403 Forbidden from nginx when unicorn started in debug mode

2012-12-04 Thread Eric Wong
Jerrold Thompson wrote: > 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

Re: Combating nginx 499 HTTP responses during flash traffic scenario

2012-12-03 Thread Eric Wong
Eric Wong wrote: > I fixed up some minor line-wrapping, signed-off, and added your > quote above to the commit message. Pushed as > commit 5c700fc2cf398848ddcf71a2aa3f0f2a6563e87b > to git://bogomips.org/unicorn.git One more fix/cleanup to maintain compatibility with Rain

Re: Fwd: Maintaining capacity during deploys

2012-12-03 Thread Eric Wong
Tony Arcieri wrote: > On Fri, Nov 30, 2012 at 2:27 PM, Eric Wong wrote: > > I usually put that logic in the deployment script (probably just > > with "curl -sf"), but a background thread would probably work. > > Are you doing something different than unicornct

Re: Combating nginx 499 HTTP responses during flash traffic scenario

2012-11-30 Thread Eric Wong
Eric Wong wrote: > Lawrence Pit wrote: > > A related question: is it possible to get insight in what's in the > > unicorn queue and for how long requests have been queued there? > Using SystemTap (or similar solutions), I think the same information may > be retri

Re: Fwd: Maintaining capacity during deploys

2012-11-30 Thread Eric Wong
Tony Arcieri wrote: > On Thu, Nov 29, 2012 at 3:32 PM, Eric Wong wrote: > > If the server is down to haproxy, but still up, you can send some warmup > > requests to the server before enabling the monitor-uri for haproxy. > > I've heard various solutions for exactl

Re: using unicorn with logging-rails gem

2012-11-30 Thread Eric Wong
Yoav Aner wrote: > I simply added `Logging.reopen` to the after_fork block and now it > looks like it's working again! Awesome to know. > Not sure I still fully (or even partially) understand what's going on > there, but at least it's working. Reading a manpage for the fork() syscall should hel

Re: using unicorn with logging-rails gem

2012-11-30 Thread Eric Wong
Yoav Aner wrote: > Hi Eric, > > Thanks a bunch for getting back so quickly on this. > > I followed your suggestion and tried with `preload_app = false` and looks > like this seems to fix this problem! Any idea what can go wrong when it's > set to true or how I can try go about fixing this?? pre

Re: When a client terminates a connection

2012-11-30 Thread Eric Wong
Andrew Stewart wrote: > On 30 Nov 2012, at 00:04, Eric Wong wrote: > > Iñaki Baz Castillo wrote: > >> I don't understand why the application on top of the HTTP/TCP layer > >> (so the Rails app) should be interrupted because the TCP connection is > >>

Re: using unicorn with logging-rails gem

2012-11-30 Thread Eric Wong
Yoav Aner wrote: > Hope this is the right place to ask questions about unicorn. I'm not > on the mailing list though, so please CC my email address. No problem! > Since moving from phusion passenger to Unicorn, it seems like one > functionality of the logging-rails gem > (https://github.com/TwP/

Re: Maintaining capacity during deploys

2012-11-29 Thread Eric Wong
Tony Arcieri wrote: > On Thu, Nov 29, 2012 at 3:34 PM, Lawrence Pit wrote: > > > > Perhaps it's possible to warm up the workers in the unicorn after_fork > > block? > > Are people doing this in production (i.e. moving the termination of > the old master from before_fork to after_fork)? My worry

[ANN] unicorn 4.5.0pre1 - check_client_connection option

2012-11-29 Thread Eric Wong
Just pushed out the RubyGem for this. Changes: The new check_client_connection option allows unicorn to detect most disconnected clients before potentially expensive application processing begins. This feature is useful for applications experiencing spikes of traffic leading to undesirable queue

Re: Fwd: Maintaining capacity during deploys

2012-11-29 Thread Eric Wong
Tony Arcieri wrote: > We're using unicornctl restart with the default before/after hook > behavior, which is to reap old Unicorn workers via SIGQUIT after the > new one has finished booting. > > Unfortunately, while the new workers are forking and begin processing > requests, we're still seeing s

Re: When a client terminates a connection

2012-11-29 Thread Eric Wong
Iñaki Baz Castillo wrote: > 2012/11/28 Andrew Stewart : > > 1. Client clicks a delete link in my webapp. > > 2. Rails starts processing the appropriate destroy action. This updates > > various things in the database (but not in a single db transaction). > > 3. Client terminates the connection. >

[RFC/PATCH] check_client_connection: document local-only requirement

2012-11-29 Thread Eric Wong
tcp_nodelay:false. --- Eric Wong wrote: > Tom Burns wrote: > > +if set[:check_client_connection] > > + set[:listeners].each do |address| > > +if set[:listener_opts][address][:tcp_nopush] == true > > + raise ArgumentError, > > +

Re: Combating nginx 499 HTTP responses during flash traffic scenario

2012-11-29 Thread Eric Wong
Lawrence Pit wrote: > >[2] > >http://mid.gmane.org/cak4qkg32dggnbztzcb6noh5hu_drhmofafhk-6xvy-t86++...@mail.gmail.com > >I haven't heard back on results of our nasty/crazy solution, though. > > fyi: I've been running that patch for a while in our staging > environment. As far as I can tell it wo

Re: Combating nginx 499 HTTP responses during flash traffic scenario

2012-11-29 Thread Eric Wong
Tom Burns wrote: > +if set[:check_client_connection] > + set[:listeners].each do |address| > +if set[:listener_opts][address][:tcp_nopush] == true > + raise ArgumentError, > +"check_client_connection is incompatible with tcp_nopush:true" > +end Btw, w

Re: Combating nginx 499 HTTP responses during flash traffic scenario

2012-11-29 Thread Eric Wong
Tom Burns wrote: > So we just finished the US Black Friday / Cyber Monday weekend running > unicorn forked with the last version of the patch I had sent you. It > worked splendidly and helped us handle huge flash sales without > increased response time over the weekend. > > Whereas in previous f

Re: When a client terminates a connection

2012-11-29 Thread Eric Wong
Andrew Stewart wrote: > On 28 Nov 2012, at 22:10, Eric Wong wrote: > > Yes. Using the Unicorn::PrereadInput middleware (before Rails or > > any other middleware/framework touches env["rack.input"]) should do > > everything you want. > > Excellent. > >

Re: When a client terminates a connection

2012-11-28 Thread Eric Wong
Andrew Stewart wrote: > Hello, > > I have run into the following situation several times in the past few months: > > (My stack is Nginx -- Unicorn -- Rails 3.0.12) > > 1. Client clicks a delete link in my webapp. > 2. Rails starts processing the appropriate destroy action. This updates > vari

Re: pid file deleted briefly when doing hot restart

2012-11-27 Thread Eric Wong
Petteri Räty wrote: > On 27.11.2012 4.02, Eric Wong wrote: > > Petteri Räty wrote: > >> On 27.11.2012 2.35, Eric Wong wrote: > >>>> > >>>> nginx does not explicitly unlink the old pid file before it renames it > >>>> out of th

Re: pid file deleted briefly when doing hot restart

2012-11-26 Thread Eric Wong
Petteri Räty wrote: > On 27.11.2012 2.35, Eric Wong wrote: > > >> > >> nginx does not explicitly unlink the old pid file before it renames it > >> out of the way so yes matching nginx in that regard changes the behavior > >> exactly how I originally

Re: pid file deleted briefly when doing hot restart

2012-11-26 Thread Eric Wong
Petteri Räty wrote: > On 26.11.2012 20.24, Eric Wong wrote: > > > >> The use case here is that with health monitors wouldn't have a window > >> where a pid file does not exist. With a hot restart it should always be > >> possible to have a pid file

Re: pid file deleted briefly when doing hot restart

2012-11-26 Thread Eric Wong
Petteri Räty wrote: > On 26.11.2012 2.43, Eric Wong wrote: > > Petteri Räty wrote: > >> What follows are all the write actions related to unicorn pid file when > >> doing a hot restart. Seems like a bug to me that unicorn is deleting the > >> pid file bef

Re: pid file deleted briefly when doing hot restart

2012-11-25 Thread Eric Wong
Petteri Räty wrote: > What follows are all the write actions related to unicorn pid file when > doing a hot restart. Seems like a bug to me that unicorn is deleting the > pid file before writing the new file. Is there a reason for it? It seems > to go against that rename that aims for an atomic re

<    1   2   3   4   5   6   7   8   9   >