similar to: Ruby 2.0 Bad file descriptor (Errno::EBADF)

Displaying 20 results from an estimated 2000 matches similar to: "Ruby 2.0 Bad file descriptor (Errno::EBADF)"

2011 Aug 12
16
Rack content-length Rack::Lint::LintErrors errors with unicorn
Has anyone seen anything like this before? I can get it to happen all the time if I issue a HEAD request, but it only happens very intermittently on GET requests. I''m using Ruby 1.9.2p180. Any ideas on where to start debugging? 204.93.223.151, 10.195.114.81 - - [11/Aug/2011 21:03:50] "GET / HTTP/1.0" 200 37902 0.5316 app error: Content-Length header was 37902, but should be
2012 Feb 29
2
[PATCH] Start the server if another user has a PID matching our stale pidfile.
If unicorn doesn''t get terminated cleanly (for example if the machine has its power interrupted) and the pid in the pidfile gets used by another process, the current unicorn code will exit and not start a server. This tiny patch fixes that behaviour. --- lib/unicorn/http_server.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/unicorn/http_server.rb
2011 Jan 13
5
Unicorn 3.3.1 "Too many open files" error in kgio_tryaccept
Strange error which took down my server today: Unhandled listen loop exception #<Errno::EMFILE: Too many open files - accept>. /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:606:in `kgio_tryaccept'' /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:606:in
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
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
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
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
This means we no longer waste an extra file descriptor per worker process in the master. Now there''s no need to set a higher file descriptor limit for systems running >= 1024 workers. --- I just pushed this out to git://bogomips.org/unicorn.git and it''ll be in Unicorn 4.x. The subset of raindrops used by Unicorn should work on all machines with mmap(2) +
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 Nov 05
4
Handling closed clients
We have a service that clients use to upload files. We have a couple of clients that are on slow links and so their upload times out. We get errors in the logs that I''d like to get rid of. I was hoping that the recent commit 24b9f66dcdda44378b4053645333ce9ce336b413 would help us, but it does not. After digging in a bit, I have some ideas about why and a patch I''d like comments
2011 Jan 06
1
[PATCH] close client socket after closing response body
I am wondering if there are any apps affected by this bug (and perhaps keeping people from switching Unicorn). It''s a fairly esoteric case, so I probably won''t make another release until tomorrow (sleepy now, will probably screw something else up or realize something else is broken :) Anyways it''s pushed out to master and 1.1.x-stable in case people want^Wneed it
2012 Dec 05
3
Fwd: Issue starting unicorn with non-ActiveRecord Rails app
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-12-05T04:19:25.375952 #5096] INFO -- : Refreshing Gem list I, [2012-12-05T04:19:32.941249 #5096] INFO -- :
2013 Mar 01
7
Why so many worker threads?
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 Thanks!
2012 Apr 12
8
Background jobs with #fork
Hi I''ve migrated from Passenger to Unicorn about a week ago. It''s great. Great transparency and management, thanks for this great software! A few of my Rails applications start background jobs using Kernel#fork. Of course, the ActiveRecord connections are closed and reopened again in the parent and child processes. The child process also does its job. Unfortunately, it seems
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
2011 Sep 06
1
Workers getting broken after some time
I have strange error that happens after couple of hours. Some instances start to respond on any request with status code 500. Log file unicorn.stderr.log gets populated with this error: app error: undefined method `each'' for nil:NilClass (NoMethodError) /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.2/lib/rack/utils.rb:267:in `initialize''
2012 Mar 22
1
[PATCH] make stderr_path/stdout_path support IO objects directly
--- lib/unicorn/configurator.rb | 2 +- lib/unicorn/http_server.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 89cbf5c..c9b6816 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -559,7 +559,7 @@ private def set_path(var, path) #:nodoc: case path - when
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:
2012 Apr 27
2
unicorn 4.3.0.2.g4551 gem prerelease
Can you guys test this out? Thanks. I''ll make a real 4.3.1 release tomorrow. >From RubyGems.org: gem install --pre unicorn ChangeLog since v4.3.0: commit 4551c8ad4d63d4031c618f76d39532b39e88f9be Author: Eric Wong <normalperson at yhbt.net> Date: Fri Apr 27 14:42:38 2012 -0700 stream_input: call shutdown(2) if a client EOFs on us In case the Rack app forks
2010 Jun 02
8
Read error: #<TypeError: can't modify frozen string> raised from HttpParser
Hey guys, Started running unicorn in a production server like two weeks ago. It''s been running smoothly, but looking at the logs found 44 exceptions like this: E, [2010-06-02T16:17:15.117071 #22680] ERROR -- : Read error: #<TypeError: can''t modify frozen string> E, [2010-06-02T16:17:15.117270 #22680] ERROR -- :
2013 Oct 25
2
[PATCH] support SO_REUSEPORT on new listeners (:reuseport)
This allows users to start an independent instance of unicorn on a the same port as a running unicorn (as long as both instances use :reuseport). ref: https://lwn.net/Articles/542629/ --- lib/unicorn/configurator.rb | 19 +++++++++++++++++++ lib/unicorn/socket_helper.rb | 30 ++++++++++++++++++++++-------- test/unit/test_socket_helper.rb | 8 ++++++++ 3 files changed, 49 insertions(+), 8