Sha256: 55441bc2d85809afa91615f0935a4afa8a31f429104a571c0e41d608cb1a1436

Contents?: true

Size: 1.23 KB

Versions: 15

Compression:

Stored size: 1.23 KB

Contents

# To the extent possible under law, Eric Wong has waived all copyright and
# related or neighboring rights to this examples
# A typical Rack example for hosting a single Rack application with yahns
# and only frequently-useful config values
#
# See yahns_config(5) manpage for more information

worker_processes(1) do
  # these names are based on pthread_atfork(3) documentation
  atfork_child do
    defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
    puts "#$$ yahns worker is running"
  end
  atfork_prepare do
    defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
    puts "#$$ yahns parent about to spawn"
  end
  atfork_parent do
    puts "#$$ this is probably not useful"
  end
end

# working_directory "/path/to/my_app"
stdout_path "/path/to/my_logs/out.log"
stderr_path "/path/to/my_logs/err.log"
pid "/path/to/my_pids/yahns.pid"
client_expire_threshold 0.5

queue do
  worker_threads 50
end

app(:rack, "config.ru", preload: false) do
  listen 8080
  client_max_body_size 1024 * 1024
  input_buffering true
  output_buffering true # this lazy by default
  client_timeout 5
  persistent_connections true
end

# Note: this file is used by test_config.rb, be sure to update that
# if we update this

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
yahns-1.11.0 examples/yahns_rack_basic.conf.rb
yahns-1.10.0 examples/yahns_rack_basic.conf.rb
yahns-1.9.0 examples/yahns_rack_basic.conf.rb
yahns-1.8.0 examples/yahns_rack_basic.conf.rb
yahns-1.7.0 examples/yahns_rack_basic.conf.rb
yahns-1.6.0 examples/yahns_rack_basic.conf.rb
yahns-1.5.0 examples/yahns_rack_basic.conf.rb
yahns-1.4.0 examples/yahns_rack_basic.conf.rb
yahns-1.3.1 examples/yahns_rack_basic.conf.rb
yahns-1.3.0 examples/yahns_rack_basic.conf.rb
yahns-1.2.0 examples/yahns_rack_basic.conf.rb
yahns-1.1.0 examples/yahns_rack_basic.conf.rb
yahns-1.0.0 examples/yahns_rack_basic.conf.rb
yahns-0.0.3 examples/yahns_rack_basic.conf.rb
yahns-0.0.2 examples/yahns_rack_basic.conf.rb