search for: worker_processes

Displaying 20 results from an estimated 21 matches for "worker_processes".

2012 Nov 19
3
Number of worker processes on hyperthreaded processor
Good morning, The tuning page says worker_processes should be at least the number of CPU cores on a dedicated server. In the case of hyper-threading, should this be the number of cores or the number of threads? For example the Intel Core i7-2600 Quadcore[1] has 4 cores and 8 threads. Would I start my worker_processes at 4 or 8? Finally, would th...
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
2010 Feb 14
6
Nginx Sock And Rails Envinroment Error
...sock, if i visit that port, the errors are rendered as normal with a 500 page, the same port, throught nginx, shows errors like you do in development. The app is rails latest (not 3), i run it with unicorn_rails -E production -c /root/pbr/current/config/unicorn.rb -D and unicorn.rb looks like.. worker_processes (20) preload_app(true) Im thinking it could be a permissions problem, the rails directory is in under root, nginx runs as user nginx, but i have given chown permission the the directory? Cheers, Alex Please CC alexbarlowis at me.com
2013 Oct 20
2
optimize la value of pool in database.yml
Hi, I would like to understand how to calculate optimal value for "pool" parameter in database.yml I''m using rails 3, ruby 2, postgres, elasticsearch, unicorn, nginx My server : 12 coeurs 24 threads ( I dont know if it is necessary for define pool value) unicorn : worker_processes 24 I have around 1500 pages requested per minutes, and around 200ms per request Is it also useful/necessary to use this ? allow_concurrency: true thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from th...
2009 Oct 02
0
[PATCH] configurator: update some migration examples
...ase) + # # when doing a transparent upgrade. The last worker spawned + # # will then kill off the old master process with a SIGQUIT. + # old_pid = "#{server.config[:pid]}.oldbin" + # if old_pid != server.pid + # begin + # sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU + # Process.kill(sig, File.read(old_pid).to_i) + # rescue Errno::ENOENT, Errno::ESRCH + # end + # + # # optionally throttle the master from forking too quickly by sleeping + # sleep 1 # end # # after_fork do |server, worker| + # # per-pr...
2010 Oct 02
2
Unicorn doesn't reload the app after the HUP signal
...lled(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 the new changes, here is my unicorn config: rails_env = ENV[''RAILS_ENV''] || ''production'' worker_processes (rails_env == ''production'' ? 3 : 1) preload_app true timeout 30 listen File.expand_path(File.join(__FILE__, "../../tmp/sockets/unicorn.sock")), :backlog => 2048 if GC.respond_to?(:copy_on_write_friendly=) GC.copy_on_write_friendly = true end before_fork do |server...
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
...ase something went wrong reexec when :WINCH if Unicorn::Configurator::RACKUP[:daemonized] respawn = false logger.info "gracefully stopping all workers" - kill_each_worker(:QUIT) + soft_kill_each_worker(:QUIT) self.worker_processes = 0 else logger.info "SIGWINCH ignored because we''re not daemonized" @@ -345,7 +337,11 @@ class Unicorn::HttpServer self.listeners = [] limit = Time.now + timeout until WORKERS.empty? || Time.now > limit - kill_each_worker(graceful ? :QU...
2006 Dec 07
17
compress and max upload size?
I am using mongrel_cluster with mod_proxy_balancer and would like to enable compression (assuming it improves throughtput) and limit file size upload. I configured mod_deflate and LimitRequestSize in Apache, but in my trials looks like the proxied calls bypass those directives (the conf goes below). Is there a way to get this? -- fxn # Adapt this .example locally, as usual. # # To be
2011 Jul 08
2
Puppetmaster setup with separate CA server configuration help
.../ssl [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig server = loadbalancer01 listen = true [master] ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY ca = false ------------- Nginx.conf --------------- user nginx; worker_processes 10; worker_rlimit_nofile 100000; error_log logs/error.log info; pid logs/nginx.pid; events { worker_connections 1024; use epoll; } http { passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7; passenger_ruby /usr/bin/ruby; include mime.types; defau...
2011 May 19
2
unicorn doesn't restart properly after cap deploy (not using Bundler)
...ly=) ? GC.copy_on_write_friendly = true end before_fork do |server, worker| ? STDERR.puts "BEFORE FORK:" ? STDERR.puts ENV.inspect ? defined?(ActiveRecord::Base) and ? ? ActiveRecord::Base.connection.disconnect! ? if old_pid != server.pid ? ? begin ? ? ? sig = (worker.nr?+ 1) >= server.worker_processes ? :QUIT : :TTOU ? ? ? Process.kill(sig, File.read(old_pid).to_i) ? ? rescue Errno::ENOENT, Errno::ESRCH ? ? end ? end end after_fork do |server, worker| ? STDERR.puts "AFTER FORK:" ? STDERR.puts ENV.inspect ? defined?(ActiveRecord::Base) and ? ? ActiveRecord::Base.establish_connection ?...
2011 Feb 06
6
Request queue length
Is there a way to get the number of requests that are currently awaiting to be executed by my rails app by unicorn? Or there is no queue in unicorn and I should look for this information somewhere in nginx or other front-end server? Couldn''t find much information about this topic, so decided to ask here first.
2013 May 30
0
HTTP 500 error page
Hello all, I''d like to have nginx+passenger show the custom (Default) error pages when a HTTP 500 error occurs in my app. I am running a rails 2.3 app on nginx 1.2 with passenger 3.0.7 Here is my nginx config file: #user nobody; worker_processes 16; error_log /opt/nginx/logs/error.log info; pid /opt/nginx/logs/nginx.pid; worker_rlimit_nofile 32768; events { worker_connections 2048; } http { passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7; passenger_ruby /usr/bin/ruby; include mime.typ...
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 06
2
pasenger does not start puppet master under nginx
...r [root@bangvmpllDA02 nginx]# passenger-status ----------- General information ----------- max = 15 count = 0 active = 0 inactive = 0 Waiting on global queue: 0 ----------- Application groups ----------- [root@bangvmpllDA02 nginx]# here''s my nginx configuration user puppet; worker_processes 4; #error_log logs/error.log; #error_log logs/error.log notice; error_log logs/error.log info; #pid logs/nginx.pid; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_fo...
2013 May 25
1
Silent Failure when starting Unicorn on Heroku
...in `load'' from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:19:in `<main>'' Process exited with status 1 State changed from starting to crashed Procfile: web: bundle exec unicorn start -p $PORT -c ./config/unicorn.rb sidekiq: bundle exec sidekiq -c 10 unicorn.rb: worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3) timeout 15 preload_app true before_fork do |server, worker| Signal.trap ''TERM'' do puts ''Unicorn master intercepting TERM and sending myself QUIT instead'' Process.kill ''QUI...
2023 Jul 06
0
njs-0.8.0
...r files. ngx.version - the nginx version as a string, for example: "1.25.0". ngx.version_number - the nginx version as a number, for example: 1025000. ngx.worker_id - corresponds to an nginx internal worker id. The value is between 0 and worker_processes - 1. *) Feature: introduced js_shared_dict_zone directive. The directive allows to declare a dictionary that is shared among the working processes. *) Improvement: added compile-time options to disable njs modules. For example to disable libxslt related code:...
2013 Mar 14
1
Ubuntu 12.10 Nginx Rails 3.2.13. Deploy in sub URI. Nothing happens!
...ils-app-with-phusion-passenger-for-nginx and successfully deployed two apps on the same web server, some months ago. Then when I upgraded to Rails 2.3.13.rc1 everything seems to be OK, but when I visit my app with the browser all that I get is the Welcome page from Nginx. Here is my nginx.conf: worker_processes 4; http { passenger_root /home/luis/.rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19; passenger_ruby /home/luis/.rvm/wrappers/ruby-1.9.3-p392/ruby; server { listen 80; server_name domain.com; root /home/lacy/public_html; passenger_enabled on;...
2012 Aug 31
1
after_fork - ActiveRecord::AdapterNotSpecified
...;' do ? @users = User.all ? "This is a Sinatra test. We have #{@users.count} users." end The config.ru require ''./test'' run Sinatra::Application The config/unicorn.rb @dir = ''/home/frankr/tmp/sinatra/'' pidfile = " #{@dir}log/unicorn.pid" worker_processes 3 preload_app true GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true timeout 30 listen ''/tmp/sinatra.socket'', :backlog => 64 pid pidfile stderr_path "#{@dir}log/unicorn.stderr.log" stdout_path "#{@dir}log/unicorn.stdout.log" bef...
2013 May 20
2
Unicorn + RUnit Rails Not Killing Old Master
...isten "8080", :tcp_nodelay => true, :backlog => 100 working_directory ''/opt/myzippykid/deployment/current'' # What the timeout for killing busy workers is, in seconds timeout 60 # Whether the app should be pre-loaded preload_app false # How many worker processes worker_processes 1 # What to do before we fork a worker before_fork do |server, worker| sleep 1 end https://gist.github.com/grahamc/7ca7e3942d19f60d339a: #!/bin/bash cd /opt/myzippykid/deployment/current exec 2>&1 exec /usr/bin/chpst \ -u myzippykid:myzippykid \ /opt/myzippykid/bundle_wrapper.sh...
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
...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,10 +544,8 @@ class Unicorn::HttpServer proc_name...