Show More
@@ -1,246 +1,247 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | ; ################################# |
|
3 | ; ################################# | |
4 | ; RHODECODE VCSSERVER CONFIGURATION |
|
4 | ; RHODECODE VCSSERVER CONFIGURATION | |
5 | ; ################################# |
|
5 | ; ################################# | |
6 |
|
6 | |||
7 | [server:main] |
|
7 | [server:main] | |
8 | ; COMMON HOST/IP CONFIG |
|
8 | ; COMMON HOST/IP CONFIG | |
9 | host = 0.0.0.0 |
|
9 | host = 0.0.0.0 | |
10 | port = 9900 |
|
10 | port = 9900 | |
11 |
|
11 | |||
12 | ; ################################################## |
|
12 | ; ################################################## | |
13 | ; WAITRESS WSGI SERVER - Recommended for Development |
|
13 | ; WAITRESS WSGI SERVER - Recommended for Development | |
14 | ; ################################################## |
|
14 | ; ################################################## | |
15 |
|
15 | |||
16 | ; use server type |
|
16 | ; use server type | |
17 | use = egg:waitress#main |
|
17 | use = egg:waitress#main | |
18 |
|
18 | |||
19 | ; number of worker threads |
|
19 | ; number of worker threads | |
20 | threads = 5 |
|
20 | threads = 5 | |
21 |
|
21 | |||
22 | ; MAX BODY SIZE 100GB |
|
22 | ; MAX BODY SIZE 100GB | |
23 | max_request_body_size = 107374182400 |
|
23 | max_request_body_size = 107374182400 | |
24 |
|
24 | |||
25 | ; Use poll instead of select, fixes file descriptors limits problems. |
|
25 | ; Use poll instead of select, fixes file descriptors limits problems. | |
26 | ; May not work on old windows systems. |
|
26 | ; May not work on old windows systems. | |
27 | asyncore_use_poll = true |
|
27 | asyncore_use_poll = true | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | ; ########################### |
|
30 | ; ########################### | |
31 | ; GUNICORN APPLICATION SERVER |
|
31 | ; GUNICORN APPLICATION SERVER | |
32 | ; ########################### |
|
32 | ; ########################### | |
33 |
|
33 | |||
34 | ; run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini |
|
34 | ; run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini | |
35 |
|
35 | |||
36 | ; Module to use, this setting shouldn't be changed |
|
36 | ; Module to use, this setting shouldn't be changed | |
37 | #use = egg:gunicorn#main |
|
37 | #use = egg:gunicorn#main | |
38 |
|
38 | |||
39 | ; Sets the number of process workers. More workers means more concurrent connections |
|
39 | ; Sets the number of process workers. More workers means more concurrent connections | |
40 | ; RhodeCode can handle at the same time. Each additional worker also it increases |
|
40 | ; RhodeCode can handle at the same time. Each additional worker also it increases | |
41 | ; memory usage as each has it's own set of caches. |
|
41 | ; memory usage as each has it's own set of caches. | |
42 | ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more |
|
42 | ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more | |
43 | ; than 8-10 unless for really big deployments .e.g 700-1000 users. |
|
43 | ; than 8-10 unless for really big deployments .e.g 700-1000 users. | |
44 | ; `instance_id = *` must be set in the [app:main] section below (which is the default) |
|
44 | ; `instance_id = *` must be set in the [app:main] section below (which is the default) | |
45 | ; when using more than 1 worker. |
|
45 | ; when using more than 1 worker. | |
46 | #workers = 2 |
|
46 | #workers = 2 | |
47 |
|
47 | |||
48 | ; Gunicorn access log level |
|
48 | ; Gunicorn access log level | |
49 | #loglevel = info |
|
49 | #loglevel = info | |
50 |
|
50 | |||
51 | ; Process name visible in process list |
|
51 | ; Process name visible in process list | |
52 | #proc_name = rhodecode_vcsserver |
|
52 | #proc_name = rhodecode_vcsserver | |
53 |
|
53 | |||
54 | ; Type of worker class, one of `sync`, `gevent` |
|
54 | ; Type of worker class, one of `sync`, `gevent` | |
55 | ; currently `sync` is the only option allowed. |
|
55 | ; currently `sync` is the only option allowed. | |
56 | #worker_class = sync |
|
56 | #worker_class = sync | |
57 |
|
57 | |||
58 | ; The maximum number of simultaneous clients. Valid only for gevent |
|
58 | ; The maximum number of simultaneous clients. Valid only for gevent | |
59 | #worker_connections = 10 |
|
59 | #worker_connections = 10 | |
60 |
|
60 | |||
61 | ; Max number of requests that worker will handle before being gracefully restarted. |
|
61 | ; Max number of requests that worker will handle before being gracefully restarted. | |
62 | ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once. |
|
62 | ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once. | |
63 | #max_requests = 1000 |
|
63 | #max_requests = 1000 | |
64 | #max_requests_jitter = 30 |
|
64 | #max_requests_jitter = 30 | |
65 |
|
65 | |||
66 | ; Amount of time a worker can spend with handling a request before it |
|
66 | ; Amount of time a worker can spend with handling a request before it | |
67 | ; gets killed and restarted. By default set to 21600 (6hrs) |
|
67 | ; gets killed and restarted. By default set to 21600 (6hrs) | |
68 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) |
|
68 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) | |
69 | #timeout = 21600 |
|
69 | #timeout = 21600 | |
70 |
|
70 | |||
71 | ; The maximum size of HTTP request line in bytes. |
|
71 | ; The maximum size of HTTP request line in bytes. | |
72 | ; 0 for unlimited |
|
72 | ; 0 for unlimited | |
73 | #limit_request_line = 0 |
|
73 | #limit_request_line = 0 | |
74 |
|
74 | |||
75 | ; Limit the number of HTTP headers fields in a request. |
|
75 | ; Limit the number of HTTP headers fields in a request. | |
76 | ; By default this value is 100 and can't be larger than 32768. |
|
76 | ; By default this value is 100 and can't be larger than 32768. | |
77 | #limit_request_fields = 32768 |
|
77 | #limit_request_fields = 32768 | |
78 |
|
78 | |||
79 | ; Limit the allowed size of an HTTP request header field. |
|
79 | ; Limit the allowed size of an HTTP request header field. | |
80 | ; Value is a positive number or 0. |
|
80 | ; Value is a positive number or 0. | |
81 | ; Setting it to 0 will allow unlimited header field sizes. |
|
81 | ; Setting it to 0 will allow unlimited header field sizes. | |
82 | #limit_request_field_size = 0 |
|
82 | #limit_request_field_size = 0 | |
83 |
|
83 | |||
84 | ; Timeout for graceful workers restart. |
|
84 | ; Timeout for graceful workers restart. | |
85 | ; After receiving a restart signal, workers have this much time to finish |
|
85 | ; After receiving a restart signal, workers have this much time to finish | |
86 | ; serving requests. Workers still alive after the timeout (starting from the |
|
86 | ; serving requests. Workers still alive after the timeout (starting from the | |
87 | ; receipt of the restart signal) are force killed. |
|
87 | ; receipt of the restart signal) are force killed. | |
88 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) |
|
88 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) | |
89 | #graceful_timeout = 3600 |
|
89 | #graceful_timeout = 3600 | |
90 |
|
90 | |||
91 | # The number of seconds to wait for requests on a Keep-Alive connection. |
|
91 | # The number of seconds to wait for requests on a Keep-Alive connection. | |
92 | # Generally set in the 1-5 seconds range. |
|
92 | # Generally set in the 1-5 seconds range. | |
93 | #keepalive = 2 |
|
93 | #keepalive = 2 | |
94 |
|
94 | |||
95 | ; Maximum memory usage that each worker can use before it will receive a |
|
95 | ; Maximum memory usage that each worker can use before it will receive a | |
96 | ; graceful restart signal 0 = memory monitoring is disabled |
|
96 | ; graceful restart signal 0 = memory monitoring is disabled | |
97 | ; Examples: 268435456 (256MB), 536870912 (512MB) |
|
97 | ; Examples: 268435456 (256MB), 536870912 (512MB) | |
98 | ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB) |
|
98 | ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB) | |
99 | #memory_max_usage = 0 |
|
99 | #memory_max_usage = 0 | |
100 |
|
100 | |||
101 | ; How often in seconds to check for memory usage for each gunicorn worker |
|
101 | ; How often in seconds to check for memory usage for each gunicorn worker | |
102 | #memory_usage_check_interval = 60 |
|
102 | #memory_usage_check_interval = 60 | |
103 |
|
103 | |||
104 | ; Threshold value for which we don't recycle worker if GarbageCollection |
|
104 | ; Threshold value for which we don't recycle worker if GarbageCollection | |
105 | ; frees up enough resources. Before each restart we try to run GC on worker |
|
105 | ; frees up enough resources. Before each restart we try to run GC on worker | |
106 | ; in case we get enough free memory after that, restart will not happen. |
|
106 | ; in case we get enough free memory after that, restart will not happen. | |
107 | #memory_usage_recovery_threshold = 0.8 |
|
107 | #memory_usage_recovery_threshold = 0.8 | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | [app:main] |
|
110 | [app:main] | |
111 | ; The %(here)s variable will be replaced with the absolute path of parent directory |
|
111 | ; The %(here)s variable will be replaced with the absolute path of parent directory | |
112 | ; of this file |
|
112 | ; of this file | |
113 | use = egg:rhodecode-vcsserver |
|
113 | use = egg:rhodecode-vcsserver | |
114 |
|
114 | |||
115 |
|
115 | |||
116 | ; ############# |
|
116 | ; ############# | |
117 | ; DEBUG OPTIONS |
|
117 | ; DEBUG OPTIONS | |
118 | ; ############# |
|
118 | ; ############# | |
119 |
|
119 | |||
120 | # During development the we want to have the debug toolbar enabled |
|
120 | # During development the we want to have the debug toolbar enabled | |
121 | pyramid.includes = |
|
121 | pyramid.includes = | |
122 | pyramid_debugtoolbar |
|
122 | pyramid_debugtoolbar | |
123 |
|
123 | |||
124 | debugtoolbar.hosts = 0.0.0.0/0 |
|
124 | debugtoolbar.hosts = 0.0.0.0/0 | |
125 | debugtoolbar.exclude_prefixes = |
|
125 | debugtoolbar.exclude_prefixes = | |
126 | /css |
|
126 | /css | |
127 | /fonts |
|
127 | /fonts | |
128 | /images |
|
128 | /images | |
129 | /js |
|
129 | /js | |
130 |
|
130 | |||
131 | ; ################# |
|
131 | ; ################# | |
132 | ; END DEBUG OPTIONS |
|
132 | ; END DEBUG OPTIONS | |
133 | ; ################# |
|
133 | ; ################# | |
134 |
|
134 | |||
135 | ; Pyramid default locales, we need this to be set |
|
135 | ; Pyramid default locales, we need this to be set | |
136 | pyramid.default_locale_name = en |
|
136 | pyramid.default_locale_name = en | |
137 |
|
137 | |||
138 | ; default locale used by VCS systems |
|
138 | ; default locale used by VCS systems | |
139 | locale = en_US.UTF-8 |
|
139 | locale = en_US.UTF-8 | |
140 |
|
140 | |||
141 | ; path to binaries for vcsserver, it should be set by the installer |
|
141 | ; path to binaries for vcsserver, it should be set by the installer | |
142 | ; at installation time, e.g /home/user/vcsserver-1/profile/bin |
|
142 | ; at installation time, e.g /home/user/vcsserver-1/profile/bin | |
143 | ; it can also be a path to nix-build output in case of development |
|
143 | ; it can also be a path to nix-build output in case of development | |
144 | core.binary_dir = "" |
|
144 | core.binary_dir = "" | |
145 |
|
145 | |||
146 | ; Custom exception store path, defaults to TMPDIR |
|
146 | ; Custom exception store path, defaults to TMPDIR | |
147 | ; This is used to store exception from RhodeCode in shared directory |
|
147 | ; This is used to store exception from RhodeCode in shared directory | |
148 | #exception_tracker.store_path = |
|
148 | #exception_tracker.store_path = | |
149 |
|
149 | |||
150 | ; ############# |
|
150 | ; ############# | |
151 | ; DOGPILE CACHE |
|
151 | ; DOGPILE CACHE | |
152 | ; ############# |
|
152 | ; ############# | |
153 |
|
153 | |||
154 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. |
|
154 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. | |
155 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space |
|
155 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space | |
156 | cache_dir = %(here)s/data |
|
156 | cache_dir = %(here)s/data | |
157 |
|
157 | |||
158 | ; *************************************** |
|
158 | ; *************************************** | |
159 | ; `repo_object` cache, default file based |
|
159 | ; `repo_object` cache, default file based | |
160 | ; *************************************** |
|
160 | ; *************************************** | |
161 |
|
161 | |||
162 | ; `repo_object` cache settings for vcs methods for repositories |
|
162 | ; `repo_object` cache settings for vcs methods for repositories | |
163 | rc_cache.repo_object.backend = dogpile.cache.rc.file_namespace |
|
163 | rc_cache.repo_object.backend = dogpile.cache.rc.file_namespace | |
164 |
|
164 | |||
165 | ; cache auto-expires after N seconds |
|
165 | ; cache auto-expires after N seconds | |
166 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) |
|
166 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) | |
167 | rc_cache.repo_object.expiration_time = 2592000 |
|
167 | rc_cache.repo_object.expiration_time = 2592000 | |
168 |
|
168 | |||
169 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
169 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
170 | #rc_cache.repo_object.arguments.filename = /tmp/vcsserver_cache.db |
|
170 | #rc_cache.repo_object.arguments.filename = /tmp/vcsserver_cache.db | |
171 |
|
171 | |||
172 | ; *********************************************************** |
|
172 | ; *********************************************************** | |
173 | ; `repo_object` cache with redis backend |
|
173 | ; `repo_object` cache with redis backend | |
174 | ; recommended for larger instance, and for better performance |
|
174 | ; recommended for larger instance, and for better performance | |
175 | ; *********************************************************** |
|
175 | ; *********************************************************** | |
176 |
|
176 | |||
177 | ; `repo_object` cache settings for vcs methods for repositories |
|
177 | ; `repo_object` cache settings for vcs methods for repositories | |
178 | #rc_cache.repo_object.backend = dogpile.cache.rc.redis_msgpack |
|
178 | #rc_cache.repo_object.backend = dogpile.cache.rc.redis_msgpack | |
179 |
|
179 | |||
180 | ; cache auto-expires after N seconds |
|
180 | ; cache auto-expires after N seconds | |
181 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) |
|
181 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) | |
182 | #rc_cache.repo_object.expiration_time = 2592000 |
|
182 | #rc_cache.repo_object.expiration_time = 2592000 | |
183 |
|
183 | |||
184 | ; redis_expiration_time needs to be greater then expiration_time |
|
184 | ; redis_expiration_time needs to be greater then expiration_time | |
185 | #rc_cache.repo_object.arguments.redis_expiration_time = 3592000 |
|
185 | #rc_cache.repo_object.arguments.redis_expiration_time = 3592000 | |
186 |
|
186 | |||
187 | #rc_cache.repo_object.arguments.host = localhost |
|
187 | #rc_cache.repo_object.arguments.host = localhost | |
188 | #rc_cache.repo_object.arguments.port = 6379 |
|
188 | #rc_cache.repo_object.arguments.port = 6379 | |
189 | #rc_cache.repo_object.arguments.db = 5 |
|
189 | #rc_cache.repo_object.arguments.db = 5 | |
190 | #rc_cache.repo_object.arguments.socket_timeout = 30 |
|
190 | #rc_cache.repo_object.arguments.socket_timeout = 30 | |
191 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
191 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
192 | #rc_cache.repo_object.arguments.distributed_lock = true |
|
192 | #rc_cache.repo_object.arguments.distributed_lock = true | |
193 |
|
193 | |||
194 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
194 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
195 | #rc_cache.repo_object.arguments.lock_auto_renewal = true |
|
195 | #rc_cache.repo_object.arguments.lock_auto_renewal = true | |
196 |
|
196 | |||
197 | ; Statsd client config |
|
197 | ; Statsd client config, this is used to send metrics to statsd | |
|
198 | ; We recommend setting statsd_exported and scrape them using Promethues | |||
198 | #statsd.enabled = false |
|
199 | #statsd.enabled = false | |
199 | #statsd.statsd_host = 0.0.0.0 |
|
200 | #statsd.statsd_host = 0.0.0.0 | |
200 | #statsd.statsd_port = 8125 |
|
201 | #statsd.statsd_port = 8125 | |
201 | #statsd.statsd_prefix = |
|
202 | #statsd.statsd_prefix = | |
202 | #statsd.statsd_ipv6 = false |
|
203 | #statsd.statsd_ipv6 = false | |
203 |
|
204 | |||
204 | ; ##################### |
|
205 | ; ##################### | |
205 | ; LOGGING CONFIGURATION |
|
206 | ; LOGGING CONFIGURATION | |
206 | ; ##################### |
|
207 | ; ##################### | |
207 | [loggers] |
|
208 | [loggers] | |
208 | keys = root, vcsserver |
|
209 | keys = root, vcsserver | |
209 |
|
210 | |||
210 | [handlers] |
|
211 | [handlers] | |
211 | keys = console |
|
212 | keys = console | |
212 |
|
213 | |||
213 | [formatters] |
|
214 | [formatters] | |
214 | keys = generic |
|
215 | keys = generic | |
215 |
|
216 | |||
216 | ; ####### |
|
217 | ; ####### | |
217 | ; LOGGERS |
|
218 | ; LOGGERS | |
218 | ; ####### |
|
219 | ; ####### | |
219 | [logger_root] |
|
220 | [logger_root] | |
220 | level = NOTSET |
|
221 | level = NOTSET | |
221 | handlers = console |
|
222 | handlers = console | |
222 |
|
223 | |||
223 | [logger_vcsserver] |
|
224 | [logger_vcsserver] | |
224 | level = DEBUG |
|
225 | level = DEBUG | |
225 | handlers = |
|
226 | handlers = | |
226 | qualname = vcsserver |
|
227 | qualname = vcsserver | |
227 | propagate = 1 |
|
228 | propagate = 1 | |
228 |
|
229 | |||
229 |
|
230 | |||
230 | ; ######## |
|
231 | ; ######## | |
231 | ; HANDLERS |
|
232 | ; HANDLERS | |
232 | ; ######## |
|
233 | ; ######## | |
233 |
|
234 | |||
234 | [handler_console] |
|
235 | [handler_console] | |
235 | class = StreamHandler |
|
236 | class = StreamHandler | |
236 | args = (sys.stderr, ) |
|
237 | args = (sys.stderr, ) | |
237 | level = DEBUG |
|
238 | level = DEBUG | |
238 | formatter = generic |
|
239 | formatter = generic | |
239 |
|
240 | |||
240 | ; ########## |
|
241 | ; ########## | |
241 | ; FORMATTERS |
|
242 | ; FORMATTERS | |
242 | ; ########## |
|
243 | ; ########## | |
243 |
|
244 | |||
244 | [formatter_generic] |
|
245 | [formatter_generic] | |
245 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
246 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
246 | datefmt = %Y-%m-%d %H:%M:%S |
|
247 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,209 +1,210 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | ; ################################# |
|
3 | ; ################################# | |
4 | ; RHODECODE VCSSERVER CONFIGURATION |
|
4 | ; RHODECODE VCSSERVER CONFIGURATION | |
5 | ; ################################# |
|
5 | ; ################################# | |
6 |
|
6 | |||
7 | [server:main] |
|
7 | [server:main] | |
8 | ; COMMON HOST/IP CONFIG |
|
8 | ; COMMON HOST/IP CONFIG | |
9 | host = 127.0.0.1 |
|
9 | host = 127.0.0.1 | |
10 | port = 9900 |
|
10 | port = 9900 | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | ; ########################### |
|
13 | ; ########################### | |
14 | ; GUNICORN APPLICATION SERVER |
|
14 | ; GUNICORN APPLICATION SERVER | |
15 | ; ########################### |
|
15 | ; ########################### | |
16 |
|
16 | |||
17 | ; run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini |
|
17 | ; run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini | |
18 |
|
18 | |||
19 | ; Module to use, this setting shouldn't be changed |
|
19 | ; Module to use, this setting shouldn't be changed | |
20 | use = egg:gunicorn#main |
|
20 | use = egg:gunicorn#main | |
21 |
|
21 | |||
22 | ; Sets the number of process workers. More workers means more concurrent connections |
|
22 | ; Sets the number of process workers. More workers means more concurrent connections | |
23 | ; RhodeCode can handle at the same time. Each additional worker also it increases |
|
23 | ; RhodeCode can handle at the same time. Each additional worker also it increases | |
24 | ; memory usage as each has it's own set of caches. |
|
24 | ; memory usage as each has it's own set of caches. | |
25 | ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more |
|
25 | ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more | |
26 | ; than 8-10 unless for really big deployments .e.g 700-1000 users. |
|
26 | ; than 8-10 unless for really big deployments .e.g 700-1000 users. | |
27 | ; `instance_id = *` must be set in the [app:main] section below (which is the default) |
|
27 | ; `instance_id = *` must be set in the [app:main] section below (which is the default) | |
28 | ; when using more than 1 worker. |
|
28 | ; when using more than 1 worker. | |
29 | workers = 2 |
|
29 | workers = 2 | |
30 |
|
30 | |||
31 | ; Gunicorn access log level |
|
31 | ; Gunicorn access log level | |
32 | loglevel = info |
|
32 | loglevel = info | |
33 |
|
33 | |||
34 | ; Process name visible in process list |
|
34 | ; Process name visible in process list | |
35 | proc_name = rhodecode_vcsserver |
|
35 | proc_name = rhodecode_vcsserver | |
36 |
|
36 | |||
37 | ; Type of worker class, one of `sync`, `gevent` |
|
37 | ; Type of worker class, one of `sync`, `gevent` | |
38 | ; currently `sync` is the only option allowed. |
|
38 | ; currently `sync` is the only option allowed. | |
39 | worker_class = sync |
|
39 | worker_class = sync | |
40 |
|
40 | |||
41 | ; The maximum number of simultaneous clients. Valid only for gevent |
|
41 | ; The maximum number of simultaneous clients. Valid only for gevent | |
42 | worker_connections = 10 |
|
42 | worker_connections = 10 | |
43 |
|
43 | |||
44 | ; Max number of requests that worker will handle before being gracefully restarted. |
|
44 | ; Max number of requests that worker will handle before being gracefully restarted. | |
45 | ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once. |
|
45 | ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once. | |
46 | max_requests = 1000 |
|
46 | max_requests = 1000 | |
47 | max_requests_jitter = 30 |
|
47 | max_requests_jitter = 30 | |
48 |
|
48 | |||
49 | ; Amount of time a worker can spend with handling a request before it |
|
49 | ; Amount of time a worker can spend with handling a request before it | |
50 | ; gets killed and restarted. By default set to 21600 (6hrs) |
|
50 | ; gets killed and restarted. By default set to 21600 (6hrs) | |
51 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) |
|
51 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) | |
52 | timeout = 21600 |
|
52 | timeout = 21600 | |
53 |
|
53 | |||
54 | ; The maximum size of HTTP request line in bytes. |
|
54 | ; The maximum size of HTTP request line in bytes. | |
55 | ; 0 for unlimited |
|
55 | ; 0 for unlimited | |
56 | limit_request_line = 0 |
|
56 | limit_request_line = 0 | |
57 |
|
57 | |||
58 | ; Limit the number of HTTP headers fields in a request. |
|
58 | ; Limit the number of HTTP headers fields in a request. | |
59 | ; By default this value is 100 and can't be larger than 32768. |
|
59 | ; By default this value is 100 and can't be larger than 32768. | |
60 | limit_request_fields = 32768 |
|
60 | limit_request_fields = 32768 | |
61 |
|
61 | |||
62 | ; Limit the allowed size of an HTTP request header field. |
|
62 | ; Limit the allowed size of an HTTP request header field. | |
63 | ; Value is a positive number or 0. |
|
63 | ; Value is a positive number or 0. | |
64 | ; Setting it to 0 will allow unlimited header field sizes. |
|
64 | ; Setting it to 0 will allow unlimited header field sizes. | |
65 | limit_request_field_size = 0 |
|
65 | limit_request_field_size = 0 | |
66 |
|
66 | |||
67 | ; Timeout for graceful workers restart. |
|
67 | ; Timeout for graceful workers restart. | |
68 | ; After receiving a restart signal, workers have this much time to finish |
|
68 | ; After receiving a restart signal, workers have this much time to finish | |
69 | ; serving requests. Workers still alive after the timeout (starting from the |
|
69 | ; serving requests. Workers still alive after the timeout (starting from the | |
70 | ; receipt of the restart signal) are force killed. |
|
70 | ; receipt of the restart signal) are force killed. | |
71 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) |
|
71 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) | |
72 | graceful_timeout = 3600 |
|
72 | graceful_timeout = 3600 | |
73 |
|
73 | |||
74 | # The number of seconds to wait for requests on a Keep-Alive connection. |
|
74 | # The number of seconds to wait for requests on a Keep-Alive connection. | |
75 | # Generally set in the 1-5 seconds range. |
|
75 | # Generally set in the 1-5 seconds range. | |
76 | keepalive = 2 |
|
76 | keepalive = 2 | |
77 |
|
77 | |||
78 | ; Maximum memory usage that each worker can use before it will receive a |
|
78 | ; Maximum memory usage that each worker can use before it will receive a | |
79 | ; graceful restart signal 0 = memory monitoring is disabled |
|
79 | ; graceful restart signal 0 = memory monitoring is disabled | |
80 | ; Examples: 268435456 (256MB), 536870912 (512MB) |
|
80 | ; Examples: 268435456 (256MB), 536870912 (512MB) | |
81 | ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB) |
|
81 | ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB) | |
82 | memory_max_usage = 0 |
|
82 | memory_max_usage = 0 | |
83 |
|
83 | |||
84 | ; How often in seconds to check for memory usage for each gunicorn worker |
|
84 | ; How often in seconds to check for memory usage for each gunicorn worker | |
85 | memory_usage_check_interval = 60 |
|
85 | memory_usage_check_interval = 60 | |
86 |
|
86 | |||
87 | ; Threshold value for which we don't recycle worker if GarbageCollection |
|
87 | ; Threshold value for which we don't recycle worker if GarbageCollection | |
88 | ; frees up enough resources. Before each restart we try to run GC on worker |
|
88 | ; frees up enough resources. Before each restart we try to run GC on worker | |
89 | ; in case we get enough free memory after that, restart will not happen. |
|
89 | ; in case we get enough free memory after that, restart will not happen. | |
90 | memory_usage_recovery_threshold = 0.8 |
|
90 | memory_usage_recovery_threshold = 0.8 | |
91 |
|
91 | |||
92 |
|
92 | |||
93 | [app:main] |
|
93 | [app:main] | |
94 | ; The %(here)s variable will be replaced with the absolute path of parent directory |
|
94 | ; The %(here)s variable will be replaced with the absolute path of parent directory | |
95 | ; of this file |
|
95 | ; of this file | |
96 | use = egg:rhodecode-vcsserver |
|
96 | use = egg:rhodecode-vcsserver | |
97 |
|
97 | |||
98 | ; Pyramid default locales, we need this to be set |
|
98 | ; Pyramid default locales, we need this to be set | |
99 | pyramid.default_locale_name = en |
|
99 | pyramid.default_locale_name = en | |
100 |
|
100 | |||
101 | ; default locale used by VCS systems |
|
101 | ; default locale used by VCS systems | |
102 | locale = en_US.UTF-8 |
|
102 | locale = en_US.UTF-8 | |
103 |
|
103 | |||
104 | ; path to binaries for vcsserver, it should be set by the installer |
|
104 | ; path to binaries for vcsserver, it should be set by the installer | |
105 | ; at installation time, e.g /home/user/vcsserver-1/profile/bin |
|
105 | ; at installation time, e.g /home/user/vcsserver-1/profile/bin | |
106 | ; it can also be a path to nix-build output in case of development |
|
106 | ; it can also be a path to nix-build output in case of development | |
107 | core.binary_dir = "" |
|
107 | core.binary_dir = "" | |
108 |
|
108 | |||
109 | ; Custom exception store path, defaults to TMPDIR |
|
109 | ; Custom exception store path, defaults to TMPDIR | |
110 | ; This is used to store exception from RhodeCode in shared directory |
|
110 | ; This is used to store exception from RhodeCode in shared directory | |
111 | #exception_tracker.store_path = |
|
111 | #exception_tracker.store_path = | |
112 |
|
112 | |||
113 | ; ############# |
|
113 | ; ############# | |
114 | ; DOGPILE CACHE |
|
114 | ; DOGPILE CACHE | |
115 | ; ############# |
|
115 | ; ############# | |
116 |
|
116 | |||
117 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. |
|
117 | ; Default cache dir for caches. Putting this into a ramdisk can boost performance. | |
118 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space |
|
118 | ; eg. /tmpfs/data_ramdisk, however this directory might require large amount of space | |
119 | cache_dir = %(here)s/data |
|
119 | cache_dir = %(here)s/data | |
120 |
|
120 | |||
121 | ; *************************************** |
|
121 | ; *************************************** | |
122 | ; `repo_object` cache, default file based |
|
122 | ; `repo_object` cache, default file based | |
123 | ; *************************************** |
|
123 | ; *************************************** | |
124 |
|
124 | |||
125 | ; `repo_object` cache settings for vcs methods for repositories |
|
125 | ; `repo_object` cache settings for vcs methods for repositories | |
126 | rc_cache.repo_object.backend = dogpile.cache.rc.file_namespace |
|
126 | rc_cache.repo_object.backend = dogpile.cache.rc.file_namespace | |
127 |
|
127 | |||
128 | ; cache auto-expires after N seconds |
|
128 | ; cache auto-expires after N seconds | |
129 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) |
|
129 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) | |
130 | rc_cache.repo_object.expiration_time = 2592000 |
|
130 | rc_cache.repo_object.expiration_time = 2592000 | |
131 |
|
131 | |||
132 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
132 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
133 | #rc_cache.repo_object.arguments.filename = /tmp/vcsserver_cache.db |
|
133 | #rc_cache.repo_object.arguments.filename = /tmp/vcsserver_cache.db | |
134 |
|
134 | |||
135 | ; *********************************************************** |
|
135 | ; *********************************************************** | |
136 | ; `repo_object` cache with redis backend |
|
136 | ; `repo_object` cache with redis backend | |
137 | ; recommended for larger instance, and for better performance |
|
137 | ; recommended for larger instance, and for better performance | |
138 | ; *********************************************************** |
|
138 | ; *********************************************************** | |
139 |
|
139 | |||
140 | ; `repo_object` cache settings for vcs methods for repositories |
|
140 | ; `repo_object` cache settings for vcs methods for repositories | |
141 | #rc_cache.repo_object.backend = dogpile.cache.rc.redis_msgpack |
|
141 | #rc_cache.repo_object.backend = dogpile.cache.rc.redis_msgpack | |
142 |
|
142 | |||
143 | ; cache auto-expires after N seconds |
|
143 | ; cache auto-expires after N seconds | |
144 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) |
|
144 | ; Examples: 86400 (1Day), 604800 (7Days), 1209600 (14Days), 2592000 (30days), 7776000 (90Days) | |
145 | #rc_cache.repo_object.expiration_time = 2592000 |
|
145 | #rc_cache.repo_object.expiration_time = 2592000 | |
146 |
|
146 | |||
147 | ; redis_expiration_time needs to be greater then expiration_time |
|
147 | ; redis_expiration_time needs to be greater then expiration_time | |
148 | #rc_cache.repo_object.arguments.redis_expiration_time = 3592000 |
|
148 | #rc_cache.repo_object.arguments.redis_expiration_time = 3592000 | |
149 |
|
149 | |||
150 | #rc_cache.repo_object.arguments.host = localhost |
|
150 | #rc_cache.repo_object.arguments.host = localhost | |
151 | #rc_cache.repo_object.arguments.port = 6379 |
|
151 | #rc_cache.repo_object.arguments.port = 6379 | |
152 | #rc_cache.repo_object.arguments.db = 5 |
|
152 | #rc_cache.repo_object.arguments.db = 5 | |
153 | #rc_cache.repo_object.arguments.socket_timeout = 30 |
|
153 | #rc_cache.repo_object.arguments.socket_timeout = 30 | |
154 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends |
|
154 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |
155 | #rc_cache.repo_object.arguments.distributed_lock = true |
|
155 | #rc_cache.repo_object.arguments.distributed_lock = true | |
156 |
|
156 | |||
157 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen |
|
157 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |
158 | #rc_cache.repo_object.arguments.lock_auto_renewal = true |
|
158 | #rc_cache.repo_object.arguments.lock_auto_renewal = true | |
159 |
|
159 | |||
160 | ; Statsd client config |
|
160 | ; Statsd client config, this is used to send metrics to statsd | |
|
161 | ; We recommend setting statsd_exported and scrape them using Promethues | |||
161 | #statsd.enabled = false |
|
162 | #statsd.enabled = false | |
162 | #statsd.statsd_host = 0.0.0.0 |
|
163 | #statsd.statsd_host = 0.0.0.0 | |
163 | #statsd.statsd_port = 8125 |
|
164 | #statsd.statsd_port = 8125 | |
164 | #statsd.statsd_prefix = |
|
165 | #statsd.statsd_prefix = | |
165 | #statsd.statsd_ipv6 = false |
|
166 | #statsd.statsd_ipv6 = false | |
166 |
|
167 | |||
167 | ; ##################### |
|
168 | ; ##################### | |
168 | ; LOGGING CONFIGURATION |
|
169 | ; LOGGING CONFIGURATION | |
169 | ; ##################### |
|
170 | ; ##################### | |
170 | [loggers] |
|
171 | [loggers] | |
171 | keys = root, vcsserver |
|
172 | keys = root, vcsserver | |
172 |
|
173 | |||
173 | [handlers] |
|
174 | [handlers] | |
174 | keys = console |
|
175 | keys = console | |
175 |
|
176 | |||
176 | [formatters] |
|
177 | [formatters] | |
177 | keys = generic |
|
178 | keys = generic | |
178 |
|
179 | |||
179 | ; ####### |
|
180 | ; ####### | |
180 | ; LOGGERS |
|
181 | ; LOGGERS | |
181 | ; ####### |
|
182 | ; ####### | |
182 | [logger_root] |
|
183 | [logger_root] | |
183 | level = NOTSET |
|
184 | level = NOTSET | |
184 | handlers = console |
|
185 | handlers = console | |
185 |
|
186 | |||
186 | [logger_vcsserver] |
|
187 | [logger_vcsserver] | |
187 | level = DEBUG |
|
188 | level = DEBUG | |
188 | handlers = |
|
189 | handlers = | |
189 | qualname = vcsserver |
|
190 | qualname = vcsserver | |
190 | propagate = 1 |
|
191 | propagate = 1 | |
191 |
|
192 | |||
192 |
|
193 | |||
193 | ; ######## |
|
194 | ; ######## | |
194 | ; HANDLERS |
|
195 | ; HANDLERS | |
195 | ; ######## |
|
196 | ; ######## | |
196 |
|
197 | |||
197 | [handler_console] |
|
198 | [handler_console] | |
198 | class = StreamHandler |
|
199 | class = StreamHandler | |
199 | args = (sys.stderr, ) |
|
200 | args = (sys.stderr, ) | |
200 | level = INFO |
|
201 | level = INFO | |
201 | formatter = generic |
|
202 | formatter = generic | |
202 |
|
203 | |||
203 | ; ########## |
|
204 | ; ########## | |
204 | ; FORMATTERS |
|
205 | ; FORMATTERS | |
205 | ; ########## |
|
206 | ; ########## | |
206 |
|
207 | |||
207 | [formatter_generic] |
|
208 | [formatter_generic] | |
208 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
209 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
209 | datefmt = %Y-%m-%d %H:%M:%S |
|
210 | datefmt = %Y-%m-%d %H:%M:%S |
General Comments 0
You need to be logged in to leave comments.
Login now