don't set listen(2) backlog on inherited sockets
[yahns.git] / examples / yahns_rack_basic.conf.rb
blobf3f8e6a4a728e3ee9cd020353f8560805d169490
1 # To the extent possible under law, Eric Wong has waived all copyright and
2 # related or neighboring rights to this examples
3 # A typical Rack example for hosting a single Rack application with yahns
4 # and only frequently-useful config values
6 # See yahns_config(5) manpage for more information
8 worker_processes(1) do
9   # these names are based on pthread_atfork(3) documentation
10   atfork_child do
11     defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
12     puts "#$$ yahns worker is running"
13   end
14   atfork_prepare do
15     defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
16     puts "#$$ yahns parent about to spawn"
17   end
18   atfork_parent do
19     puts "#$$ yahns parent done spawning"
20   end
21 end
23 # working_directory "/path/to/my_app"
24 stdout_path "/path/to/my_logs/out.log"
25 stderr_path "/path/to/my_logs/err.log"
26 pid "/path/to/my_pids/yahns.pid"
27 client_expire_threshold 0.5
29 queue do
30   worker_threads 50
31 end
33 app(:rack, "config.ru", preload: false) do
34   listen 80
36   # See yahns_config(5) and OpenSSL::SSL::SSLContext on configuring
37   # HTTPS support
38   # listen 443, ssl_ctx: ...
40   client_max_body_size 1024 * 1024
41   input_buffering true
42   output_buffering true # this lazy by default
43   client_timeout 5
44   persistent_connections true
45 end
47 # Note: this file is used by test_config.rb, be sure to update that
48 # if we update this