yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
blob 33ba61984c107fe698549dcde0de9afa3c3848b5 1255 bytes (raw)
name: examples/yahns_rack_basic.conf.rb 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
# 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 "#$$ yahns parent done spawning"
  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

debug log:

solving 33ba619 ...
found 33ba619 in https://yhbt.net/yahns.git/

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).