Displaying 3 results from an estimated 3 matches for "worker_nr".
Did you mean:
worker_dir
2012 Oct 24
2
Handling timeouts?
Hi Guys,
Thanks for Unicorn, it makes my world rock. You guy have done a wonderful job and also huge thanks to the predecessors too.
The default timeout on my Rails app is 30 seconds. The app works fine most of the time but there are some parts of the app which are slow and occasionally totter over the 30 sec response time and timeout. Is there a clean way for me to hook into timeouts and notify
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
...tmp = t - diff
+ tick = worker.tick
+ 0 == tick and next # skip workers that are sleeping
+ diff = now - tick
+ tmp = t - diff
+ if tmp >= 0
next_sleep < tmp and next_sleep = tmp
next
end
@@ -472,7 +467,7 @@ class Unicorn::HttpServer
worker_nr = -1
until (worker_nr += 1) == @worker_processes
WORKERS.values.include?(worker_nr) and next
- worker = Worker.new(worker_nr, Unicorn::TmpIO.new)
+ worker = Worker.new(worker_nr)
before_fork.call(self, worker)
if pid = fork
WORKERS[pid] = worker
@@ -549,...
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
...)
@config = nil
build_app! unless preload_app
ssl_enable!
@after_fork = @listener_opts = @orig_app = nil
+ readers = LISTENERS.dup
+ readers << worker
+ trap(:QUIT) { readers.each { |io| io.close }.replace([false]) }
+ readers
end
def reopen_worker_logs(worker_nr)
logger.info "worker=#{worker_nr} reopening logs..."
Unicorn::Util.reopen_logs
logger.info "worker=#{worker_nr} done reopening logs"
- init_self_pipe!
rescue => e
logger.error(e) rescue nil
exit!(77) # EX_NOPERM in sysexits.h
@@ -635,22 +6...