webroar 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. data/CHANGELOG +48 -1
  2. data/README +11 -14
  3. data/Rakefile +1 -1
  4. data/conf/mime_type.yml +172 -166
  5. data/conf/server_internal_config.yml +30 -8
  6. data/doc/user-guide.html +294 -153
  7. data/doc/user-guide.txt +9 -13
  8. data/lib/command_runner.rb +1 -0
  9. data/lib/dependencies.rb +18 -15
  10. data/lib/installer.rb +115 -50
  11. data/src/admin_panel/app/controllers/admin_controller.rb +1 -15
  12. data/src/admin_panel/app/controllers/application_controller.rb +2 -2
  13. data/src/admin_panel/app/controllers/application_specification_controller.rb +2 -1
  14. data/src/admin_panel/app/controllers/headers_controller.rb +73 -0
  15. data/src/admin_panel/app/controllers/mail_specification_controller.rb +10 -0
  16. data/src/admin_panel/app/controllers/server_specification_controller.rb +14 -0
  17. data/src/admin_panel/app/helpers/admin_helper.rb +0 -85
  18. data/src/admin_panel/app/models/app.rb +1 -1
  19. data/src/admin_panel/app/models/application_specification.rb +33 -25
  20. data/src/admin_panel/app/models/headers.rb +116 -0
  21. data/src/admin_panel/app/models/mail_specification.rb +20 -5
  22. data/src/admin_panel/app/models/server_specification.rb +2 -7
  23. data/src/admin_panel/app/views/admin/configuration.html.erb +10 -5
  24. data/src/admin_panel/app/views/exceptions/_exception_list_partial.html.erb +4 -4
  25. data/src/admin_panel/app/views/graph/_graph_page.html.erb +3 -0
  26. data/src/admin_panel/app/views/headers/_add_expires_text_box.html.erb +35 -0
  27. data/src/admin_panel/app/views/headers/_expires_by_type_form.html.erb +65 -0
  28. data/src/admin_panel/app/views/headers/_headers_table.html.erb +113 -0
  29. data/src/admin_panel/app/views/mail_specification/_current_spec.html.erb +168 -0
  30. data/src/admin_panel/app/views/{admin → server_specification}/_add_div.html.erb +1 -1
  31. data/src/admin_panel/config/initializers/application_constants.rb +6 -0
  32. data/src/admin_panel/lib/control.rb +6 -3
  33. data/src/admin_panel/lib/scgi.rb +74 -21
  34. data/src/admin_panel/lib/yaml_writer.rb +51 -17
  35. data/src/admin_panel/public/javascripts/application.js +20 -1
  36. data/src/head/wr_access_log.c +2 -2
  37. data/src/head/wr_application.c +294 -236
  38. data/src/head/wr_application.h +8 -8
  39. data/src/head/wr_configurator.c +451 -517
  40. data/src/head/wr_configurator.h +10 -115
  41. data/src/head/wr_connection.c +26 -25
  42. data/src/head/wr_connection.h +2 -3
  43. data/src/head/wr_controller.c +110 -93
  44. data/src/head/wr_controller.h +6 -6
  45. data/src/head/wr_main.c +31 -24
  46. data/src/head/wr_request.c +70 -93
  47. data/src/head/wr_request.h +0 -4
  48. data/src/head/wr_resolver.c +21 -15
  49. data/src/head/wr_resolver.h +2 -2
  50. data/src/head/wr_server.c +36 -26
  51. data/src/head/wr_server.h +5 -5
  52. data/src/head/wr_worker.c +551 -512
  53. data/src/head/wr_worker.h +33 -20
  54. data/src/helper/wr_config.c +316 -0
  55. data/src/helper/wr_config.h +235 -0
  56. data/src/helper/wr_helper.h +1 -5
  57. data/src/helper/wr_logger.c +4 -4
  58. data/src/helper/wr_scgi.c +3 -4
  59. data/src/helper/wr_scgi.h +2 -0
  60. data/src/helper/wr_string.h +2 -2
  61. data/src/helper/wr_util.c +3 -1
  62. data/src/helper/wr_util.h +0 -0
  63. data/src/helper/wr_yaml_parser.c +30 -0
  64. data/src/helper/wr_yaml_parser.h +1 -0
  65. data/src/ruby_lib/exception_tracker/instrumentation/action_controller.rb +2 -1
  66. data/src/ruby_lib/mailer/smtpmail.rb +7 -4
  67. data/src/ruby_lib/profiler/instrumentation/action_controller.rb +2 -1
  68. data/src/ruby_lib/profiler/instrumentation/active_record.rb +3 -0
  69. data/src/ruby_lib/rack/adapter/rails.rb +14 -7
  70. data/src/ruby_lib/ruby_interface/client.rb +1 -1
  71. data/src/ruby_lib/ruby_interface/version.rb +2 -2
  72. data/src/ruby_lib/webroar_app_loader.rb +4 -2
  73. data/src/worker/wkr_controller.c +200 -140
  74. data/src/worker/wkr_http.c +14 -28
  75. data/src/worker/wkr_http.h +4 -4
  76. data/src/worker/wkr_http_request.c +12 -11
  77. data/src/worker/wkr_http_request.h +7 -8
  78. data/src/worker/wkr_http_response.c +10 -14
  79. data/src/worker/wkr_http_response.h +0 -1
  80. data/src/worker/wkr_main.c +74 -140
  81. data/src/worker/wkr_static.c +295 -108
  82. data/src/worker/wkr_static.h +20 -7
  83. data/src/worker/worker.c +245 -70
  84. data/src/worker/worker.h +46 -34
  85. data/tasks/compile.rake +128 -175
  86. data/tasks/test.rake +345 -469
  87. data/test/spec/webroar_command_spec.rb +23 -0
  88. metadata +173 -43
  89. data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/README +0 -34
  90. data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/Rakefile +0 -13
  91. data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/init.rb +0 -5
  92. data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/lib/action_mailer_tls.rb +0 -16
  93. data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb +0 -123
  94. data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/test/tls_test.rb +0 -42
  95. data/src/head/wr_config.h +0 -165
  96. data/src/ruby_lib/mailer/action_mailer_tls.rb +0 -16
  97. data/src/ruby_lib/mailer/smtp_tls.rb +0 -123
data/CHANGELOG CHANGED
@@ -1,4 +1,51 @@
1
- V0.3.1 - 22-Mar-2010
1
+ v0.4.0 - 09-Aug-2010
2
+ --------------------
3
+
4
+ New Features
5
+ ~~~~~~~~~~~~
6
+
7
+ * Supports deflat encoding for static assets.
8
+ * Support for passing environment variables to application.
9
+ * Support to build server with static Ruby library.
10
+
11
+ Fixes
12
+ ~~~~~
13
+
14
+ * Tested on Ruby 1.9.2 RC2
15
+ * Tested on Ubuntu 10.04.
16
+ * Directory path expanded when application is added from command line. (It
17
+ would allow to pass relative path)
18
+ * Fixed incorrect response code of static assets by using 'timegm' function
19
+ instead of 'mktime'.
20
+ * Requiring version.rb using relative path, to work with Ruby 1.9.2.
21
+ * Added Config::CONFIG['rubyhdrdir'] in ruby headers search path for Ruby 1.9.
22
+ * Sends '503 Service Unavailable' response, if pending message queue overflows.
23
+ * Code cleanup in Rake tasks.
24
+ * Enhanced SCGI request parsing in Admin Panel to handle chunked request.
25
+ * Added tests for application add, remove and zero down time during restart.
26
+ * Added Config::CONFIG['includedir'] in include directory list.
27
+ * Supports Rails 3 application.
28
+ * Created 'config.yml' file with default configuration if it is not found while
29
+ importing.
30
+ * Added support to start/stop/restart static-worker.
31
+ * Support to view analytics data for all the application, earlier it was only
32
+ for the application which has analytics enabled.
33
+ * Saving log files after executing load test.
34
+ * Improved rake task to execute test-suite.
35
+ * Set Expires headers from Admin Panel.
36
+ * Server specification code cleanup in Admin Panel.
37
+ * Passing application configuration parameters to worker using SCGI.
38
+ * Email notification for the captured exceptions made configurable.
39
+ * Made many server parameters configurable through config file
40
+ 'server_internal_config.yml'.
41
+ * Sends ERROR control message, if application could not be loaded by worker.
42
+ * Wait for 30 minutes before creating new worker, if three consecutive newly
43
+ created worker got timed out.
44
+ * Removed 'Cache-Control' response header from static assets. Its incorrect
45
+ handling chocking IE 6.
46
+
47
+
48
+ v0.3.1 - 22-Mar-2010
2
49
  --------------------
3
50
 
4
51
  * Refactored and improved the code for handling restarts of an application.
data/README CHANGED
@@ -25,14 +25,16 @@ Key Features
25
25
  * Provides run time performance data for the deployed applications.
26
26
  * Generates notifications in case any exceptions occur in any of the deployed
27
27
  applications.
28
+ * Zero Downtime Application Upgrades.
29
+ * Static assets encoding.
28
30
  * SSL support.
29
31
 
30
32
  Supported Operating Systems
31
33
  ---------------------------
32
34
 
33
- WebROaR has been tested on Ubuntu 8.10/9.04/9.10, Debian 5 (64 Bit), Mac OS X
34
- (v10.5 & v10.6), Arch Linux 2009.08 and Cent OS 5.2. Basically, it should be
35
- able to run on any *IX OS.
35
+ WebROaR has been tested on Ubuntu 8.10/9.04/9.10/10.04, Debian 5 (64 Bit),
36
+ Mac OS X (v10.5 & v10.6), Arch Linux 2009.08 and Cent OS 5.2. Basically, it
37
+ should be able to run on any *IX OS.
36
38
 
37
39
  Currently it does not support Microsoft(R) Windows.
38
40
 
@@ -53,17 +55,6 @@ Prerequisites
53
55
  - gnutls 2.4.1 or later (Only necessary in case SSL support is required)
54
56
  - gnutls-dev 2.4.1 or later (Only necessary in case SSL support is required)
55
57
 
56
- [NOTE]
57
- .Ruby Shared Library
58
- ===============================
59
- The server needs the shared library - libruby.so to run the ruby web
60
- applications.
61
-
62
- If you are building ruby from source, please ensure you pass the flag
63
- *--enable-shared* while executing its ./configure script.
64
-
65
- ===============================
66
-
67
58
  Procedure
68
59
  ~~~~~~~~~
69
60
 
@@ -114,3 +105,9 @@ Configure further SSL options in the server's admin panel
114
105
  After restarting the server, admin panel would now also be accessible over SSL.
115
106
  *https://<yourservername>:<port>/admin-panel*
116
107
  ===============================
108
+
109
+ Known Issue
110
+ -----------
111
+
112
+ WebROaR with SSL build crashes on Ubuntu 10.04 upon execution of
113
+ 'gnutls_handshake' by secure connection.
data/Rakefile CHANGED
@@ -22,6 +22,6 @@ SUDO = "sudo"
22
22
  require 'rubygems'
23
23
  require 'rake'
24
24
  require 'rake/clean'
25
- require 'src/ruby_lib/ruby_interface/version'
25
+ require './src/ruby_lib/ruby_interface/version'
26
26
 
27
27
  Dir['tasks/*.rake'].each { |rake| load rake }
data/conf/mime_type.yml CHANGED
@@ -1,166 +1,172 @@
1
- # File extension entry should be in lower case.
2
- eps: application/postscript
3
- mpg: video/mpeg
4
- ppt: application/vnd.ms-powerpoint
5
- h: text/x-c
6
- jpeg: image/jpeg
7
- aif: audio/x-aiff
8
- m3u: audio/x-mpegurl
9
- asx: video/x-ms-asf
10
- xml: application/xml
11
- 3gp: video/3gpp
12
- csv: text/csv
13
- rtf: application/rtf
14
- mov: video/quicktime
15
- bz2: application/x-bzip2
16
- dmg: application/octet-stream
17
- gem: application/octet-stream
18
- mml: application/mathml+xml
19
- sh: application/x-sh
20
- ru: text/x-script.ruby
21
- rss: application/rss+xml
22
- iso: application/octet-stream
23
- pnm: image/x-portable-anymap
24
- msi: application/x-msdownload
25
- log: text/plain
26
- xpm: image/x-xpixmap
27
- djvu: image/vnd.djvu
28
- deb: application/x-debian-package
29
- odp: application/vnd.oasis.opendocument.presentation
30
- dot: application/msword
31
- xsl: application/xml
32
- aiff: audio/x-aiff
33
- au: audio/basic
34
- bat: application/x-msdownload
35
- for: text/x-fortran
36
- pl: text/x-script.perl
37
- wma: audio/x-ms-wma
38
- cab: application/vnd.ms-cab-compressed
39
- ifb: text/calendar
40
- pm: text/x-script.perl-module
41
- class: application/octet-stream
42
- xbm: image/x-xbitmap
43
- sgml: text/sgml
44
- ods: application/vnd.oasis.opendocument.spreadsheet
45
- text: text/plain
46
- p: text/x-pascal
47
- js: application/javascript
48
- odt: application/vnd.oasis.opendocument.text
49
- hh: text/x-c
50
- flv: video/x-flv
51
- bmp: image/bmp
52
- wrl: model/vrml
53
- torrent: application/x-bittorrent
54
- sgm: text/sgml
55
- roff: text/troff
56
- gif: image/gif
57
- vcf: text/x-vcard
58
- texinfo: application/x-texinfo
59
- so: application/octet-stream
60
- mng: video/x-mng
61
- ms: text/troff
62
- dvi: application/x-dvi
63
- tif: image/tiff
64
- s: text/x-asm
65
- json: application/json
66
- t: text/troff
67
- svg: image/svg+xml
68
- cc: text/x-c
69
- ps: application/postscript
70
- html: text/html
71
- tcl: application/x-tcl
72
- jpg: image/jpeg
73
- tex: application/x-tex
74
- tbz: application/x-bzip-compressed-tar
75
- com: application/x-msdownload
76
- gz: application/x-gzip
77
- f90: text/x-fortran
78
- m4v: video/mp4
79
- rake: text/x-script.ruby
80
- pdf: application/pdf
81
- jar: application/java-archive
82
- exe: application/x-msdownload
83
- war: application/java-archive
84
- snd: audio/basic
85
- atom: application/atom+xml
86
- dtd: application/xml-dtd
87
- mdoc: text/troff
88
- asc: application/pgp-signature
89
- djv: image/vnd.djvu
90
- mid: audio/midi
91
- rdf: application/rdf+xml
92
- mathml: application/mathml+xml
93
- midi: audio/midi
94
- py: text/x-script.python
95
- ico: image/vnd.microsoft.icon
96
- tiff: image/tiff
97
- ra: audio/x-pn-realaudio
98
- asf: video/x-ms-asf
99
- mime: message/rfc822
100
- wav: audio/x-wav
101
- vrml: model/vrml
102
- rb: text/x-script.ruby
103
- mpeg: video/mpeg
104
- mp3: audio/mpeg
105
- diff: text/x-diff
106
- gemspec: text/x-script.ruby
107
- yml: text/yaml
108
- xhtml: application/xhtml+xml
109
- mp4: video/mp4
110
- der: application/x-x509-ca-cert
111
- psd: image/vnd.adobe.photoshop
112
- svgz: image/svg+xml
113
- ics: text/calendar
114
- jnlp: application/x-java-jnlp-file
115
- ram: audio/x-pn-realaudio
116
- vcs: text/x-vcalendar
117
- pgm: image/x-portable-graymap
118
- crt: application/x-x509-ca-cert
119
- swf: application/x-shockwave-flash
120
- avi: video/x-msvideo
121
- doc: application/msword
122
- java: text/x-java-source
123
- pas: text/x-pascal
124
- tr: text/troff
125
- asm: text/x-asm
126
- ear: application/java-archive
127
- qt: video/quicktime
128
- pgp: application/pgp-encrypted
129
- rar: application/x-rar-compressed
130
- eml: message/rfc822
131
- wmv: video/x-ms-wmv
132
- bin: application/octet-stream
133
- ppm: image/x-portable-pixmap
134
- wsdl: application/wsdl+xml
135
- sig: application/pgp-signature
136
- ai: application/postscript
137
- a: application/octet-stream
138
- mp4v: video/mp4
139
- zip: application/zip
140
- wmx: video/x-ms-wmx
141
- tar: application/x-tar
142
- cpp: text/x-c
143
- cxx: text/x-c
144
- htm: text/html
145
- dll: application/x-msdownload
146
- pkg: application/octet-stream
147
- c: text/x-c
148
- xslt: application/xslt+xml
149
- xls: application/vnd.ms-excel
150
- rpm: application/x-redhat-package-manager
151
- f77: text/x-fortran
152
- pbm: image/x-portable-bitmap
153
- yaml: text/yaml
154
- png: image/png
155
- conf: text/plain
156
- me: text/troff
157
- texi: application/x-texinfo
158
- man: text/troff
159
- pem: application/x-x509-ca-cert
160
- chm: application/vnd.ms-htmlhelp
161
- ogg: application/ogg
162
- f: text/x-fortran
163
- txt: text/plain
164
- mbox: application/mbox
165
- pps: application/vnd.ms-powerpoint
166
- css: text/css
1
+ ################################################################################
2
+ # List of File Extensions and their Content-Type
3
+ ################################################################################
4
+
5
+ # NOTE: File extension entry should be in lower case.
6
+
7
+ File Extensions:
8
+ eps: application/postscript
9
+ mpg: video/mpeg
10
+ ppt: application/vnd.ms-powerpoint
11
+ h: text/x-c
12
+ jpeg: image/jpeg
13
+ aif: audio/x-aiff
14
+ m3u: audio/x-mpegurl
15
+ asx: video/x-ms-asf
16
+ xml: application/xml
17
+ 3gp: video/3gpp
18
+ csv: text/csv
19
+ rtf: application/rtf
20
+ mov: video/quicktime
21
+ bz2: application/x-bzip2
22
+ dmg: application/octet-stream
23
+ gem: application/octet-stream
24
+ mml: application/mathml+xml
25
+ sh: application/x-sh
26
+ ru: text/x-script.ruby
27
+ rss: application/rss+xml
28
+ iso: application/octet-stream
29
+ pnm: image/x-portable-anymap
30
+ msi: application/x-msdownload
31
+ log: text/plain
32
+ xpm: image/x-xpixmap
33
+ djvu: image/vnd.djvu
34
+ deb: application/x-debian-package
35
+ odp: application/vnd.oasis.opendocument.presentation
36
+ dot: application/msword
37
+ xsl: application/xml
38
+ aiff: audio/x-aiff
39
+ au: audio/basic
40
+ bat: application/x-msdownload
41
+ for: text/x-fortran
42
+ pl: text/x-script.perl
43
+ wma: audio/x-ms-wma
44
+ cab: application/vnd.ms-cab-compressed
45
+ ifb: text/calendar
46
+ pm: text/x-script.perl-module
47
+ class: application/octet-stream
48
+ xbm: image/x-xbitmap
49
+ sgml: text/sgml
50
+ ods: application/vnd.oasis.opendocument.spreadsheet
51
+ text: text/plain
52
+ p: text/x-pascal
53
+ js: application/javascript
54
+ odt: application/vnd.oasis.opendocument.text
55
+ hh: text/x-c
56
+ flv: video/x-flv
57
+ bmp: image/bmp
58
+ wrl: model/vrml
59
+ torrent: application/x-bittorrent
60
+ sgm: text/sgml
61
+ roff: text/troff
62
+ gif: image/gif
63
+ vcf: text/x-vcard
64
+ texinfo: application/x-texinfo
65
+ so: application/octet-stream
66
+ mng: video/x-mng
67
+ ms: text/troff
68
+ dvi: application/x-dvi
69
+ tif: image/tiff
70
+ s: text/x-asm
71
+ json: application/json
72
+ t: text/troff
73
+ svg: image/svg+xml
74
+ cc: text/x-c
75
+ ps: application/postscript
76
+ html: text/html
77
+ tcl: application/x-tcl
78
+ jpg: image/jpeg
79
+ tex: application/x-tex
80
+ tbz: application/x-bzip-compressed-tar
81
+ com: application/x-msdownload
82
+ gz: application/x-gzip
83
+ f90: text/x-fortran
84
+ m4v: video/mp4
85
+ rake: text/x-script.ruby
86
+ pdf: application/pdf
87
+ jar: application/java-archive
88
+ exe: application/x-msdownload
89
+ war: application/java-archive
90
+ snd: audio/basic
91
+ atom: application/atom+xml
92
+ dtd: application/xml-dtd
93
+ mdoc: text/troff
94
+ asc: application/pgp-signature
95
+ djv: image/vnd.djvu
96
+ mid: audio/midi
97
+ rdf: application/rdf+xml
98
+ mathml: application/mathml+xml
99
+ midi: audio/midi
100
+ py: text/x-script.python
101
+ ico: image/vnd.microsoft.icon
102
+ tiff: image/tiff
103
+ ra: audio/x-pn-realaudio
104
+ asf: video/x-ms-asf
105
+ mime: message/rfc822
106
+ wav: audio/x-wav
107
+ vrml: model/vrml
108
+ rb: text/x-script.ruby
109
+ mpeg: video/mpeg
110
+ mp3: audio/mpeg
111
+ diff: text/x-diff
112
+ gemspec: text/x-script.ruby
113
+ yml: text/yaml
114
+ xhtml: application/xhtml+xml
115
+ mp4: video/mp4
116
+ der: application/x-x509-ca-cert
117
+ psd: image/vnd.adobe.photoshop
118
+ svgz: image/svg+xml
119
+ ics: text/calendar
120
+ jnlp: application/x-java-jnlp-file
121
+ ram: audio/x-pn-realaudio
122
+ vcs: text/x-vcalendar
123
+ pgm: image/x-portable-graymap
124
+ crt: application/x-x509-ca-cert
125
+ swf: application/x-shockwave-flash
126
+ avi: video/x-msvideo
127
+ doc: application/msword
128
+ java: text/x-java-source
129
+ pas: text/x-pascal
130
+ tr: text/troff
131
+ asm: text/x-asm
132
+ ear: application/java-archive
133
+ qt: video/quicktime
134
+ pgp: application/pgp-encrypted
135
+ rar: application/x-rar-compressed
136
+ eml: message/rfc822
137
+ wmv: video/x-ms-wmv
138
+ bin: application/octet-stream
139
+ ppm: image/x-portable-pixmap
140
+ wsdl: application/wsdl+xml
141
+ sig: application/pgp-signature
142
+ ai: application/postscript
143
+ a: application/octet-stream
144
+ mp4v: video/mp4
145
+ zip: application/zip
146
+ wmx: video/x-ms-wmx
147
+ tar: application/x-tar
148
+ cpp: text/x-c
149
+ cxx: text/x-c
150
+ htm: text/html
151
+ dll: application/x-msdownload
152
+ pkg: application/octet-stream
153
+ c: text/x-c
154
+ xslt: application/xslt+xml
155
+ xls: application/vnd.ms-excel
156
+ rpm: application/x-redhat-package-manager
157
+ f77: text/x-fortran
158
+ pbm: image/x-portable-bitmap
159
+ yaml: text/yaml
160
+ png: image/png
161
+ conf: text/plain
162
+ me: text/troff
163
+ texi: application/x-texinfo
164
+ man: text/troff
165
+ pem: application/x-x509-ca-cert
166
+ chm: application/vnd.ms-htmlhelp
167
+ ogg: application/ogg
168
+ f: text/x-fortran
169
+ txt: text/plain
170
+ mbox: application/mbox
171
+ pps: application/vnd.ms-powerpoint
172
+ css: text/css
@@ -1,16 +1,38 @@
1
1
  # Server’s Internal Configuration
2
2
 
3
3
  starling:
4
- host: 127.0.0.1 # host name that runs the starling message queue
5
- port: 22122 # port number of the starling message queue
6
- profiler_queue_name: profiler_queue # queue name to read/write profiling data
7
- exception_queue_name: exception_queue # queue name to read/write exceptions
8
- pid_queue_name: pid_queue # queue to dispatch worker process id
9
- max_queue_items: 30000 # Max number of unprocessed messages in queue. One message is approximately 1 Kb
4
+ host: 127.0.0.1 # Host that runs the starling message queue
5
+ port: 22122 # Port number of the starling message queue
6
+ profiler_queue_name: profiler_queue # Queue to read/write profiling data
7
+ exception_queue_name: exception_queue # Queue to read/write exceptions
8
+ pid_queue_name: pid_queue # Queue to dispatch worker process id
9
+ max_queue_items: 30000 # Maximum number of unprocessed messages in queue. One message is approximately 1 Kb
10
+
10
11
  webroar_analyzer_script:
11
- pid_file: /var/run/webroar_analyzer.pid # pid file path to store pid of analyzer
12
+ pid_file: /var/run/webroar_analyzer.pid # File to store pid of analyzer
12
13
  daemonize: true # true or false
13
14
  log_file: /var/log/webroar/analyzer.log
14
- sampling_rate: 1 # sampling time (in mins)
15
+ sampling_rate: 1 # Sampling time (in mins)
15
16
  environment: production # to choose the database specific to environment
16
17
 
18
+ ## Application Configuration ##
19
+ Application:
20
+ message_queue_size: 2048 # Queue size of pending requests for each application. Default is 2048
21
+ maximum_request_ratio: 1 # Ratio of pending requests to active workes to create new worker. Default is 1
22
+ minimum_request_ratio: 3 # Ratio of pending requests to active workes to destroy free worker. Default is 3
23
+ high_load_time: 2 # Number of seconds to check high load before creating new worker. Default is 2
24
+ low_load_time: 600 # Number of seconds to check low load before destroying free worker. Default is 600
25
+ maximum_hosts: 16 # Maximum number of hosts allowed. Default is 16
26
+
27
+ ## Worker Configuration ##
28
+ Worker:
29
+ maximum_request_body_size: 65536 # If the request body is larger than this size, use file to read/write request body. Default is 65536
30
+ maximum_workers: 20 # Maximum number of workers allowed. Default is 20
31
+ pending_workers: 10 # Maximum number of pending workers. Default is 10
32
+ add_trials: 3 # Number of consecutive tries to add worker. Default is 3
33
+ add_wait: 1800 # Number of seconds to wait for creating new worker, if all consecutive trials are failed. Default is 1800
34
+ add_timeout: 25 # Number of seconds to wait for a response form newly created worker. Default is 25. Set value to 0 to disable add timeout.
35
+ kill_timeout: 10 # Number of seconds to wait before killing stucked worker. Default is 10
36
+ idle_time: 60 # If worker is unable to process request within this time, send PING signal. Default is 60. Set value to 0 to disable idle timer.
37
+ ping_timeout: 15 # Number of seconds to wait for a response of PING signal. Default is 15
38
+ ping_trials: 2 # Number of PING signals to identify stuck workers. Default is 2