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
9 # these names are based on pthread_atfork(3) documentation
11 defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
12 puts "#$$ yahns worker is running"
15 defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
16 puts "#$$ yahns parent about to spawn"
19 puts "#$$ yahns parent done spawning"
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
33 app(:rack, "config.ru", preload: false) do
36 # See yahns_config(5) and OpenSSL::SSL::SSLContext on configuring
38 # listen 443, ssl_ctx: ...
40 client_max_body_size 1024 * 1024
42 output_buffering true # this lazy by default
44 persistent_connections true
47 # Note: this file is used by test_config.rb, be sure to update that