##// END OF EJS Templates
configs: show worker_connection option for gunicorn
marcink -
r11:2880f0df default
parent child Browse files
Show More
@@ -1,575 +1,577 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # RhodeCode Enterprise - configuration file #
4 4 # Built-in functions and variables #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 # #
7 7 ################################################################################
8 8
9 9 [DEFAULT]
10 10 debug = true
11 11 pdebug = false
12 12 ################################################################################
13 13 ## Uncomment and replace with the email address which should receive ##
14 14 ## any error reports after an application crash ##
15 15 ## Additionally these settings will be used by the RhodeCode mailing system ##
16 16 ################################################################################
17 17 #email_to = admin@localhost
18 18 #error_email_from = paste_error@localhost
19 19 #app_email_from = rhodecode-noreply@localhost
20 20 #error_message =
21 21 #email_prefix = [RhodeCode]
22 22
23 23 #smtp_server = mail.server.com
24 24 #smtp_username =
25 25 #smtp_password =
26 26 #smtp_port =
27 27 #smtp_use_tls = false
28 28 #smtp_use_ssl = true
29 29 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
30 30 #smtp_auth =
31 31
32 32 [server:main]
33 33 ## COMMON ##
34 34 host = 127.0.0.1
35 35 port = 5000
36 36
37 37 ##########################
38 38 ## WAITRESS WSGI SERVER ##
39 39 ##########################
40 40 use = egg:waitress#main
41 41 ## number of worker threads
42 42 threads = 5
43 43 ## MAX BODY SIZE 100GB
44 44 max_request_body_size = 107374182400
45 45 ## Use poll instead of select, fixes file descriptors limits problems.
46 46 ## May not work on old windows systems.
47 47 asyncore_use_poll = true
48 48
49 49
50 50 ##########################
51 51 ## GUNICORN WSGI SERVER ##
52 52 ##########################
53 53 ## run with gunicorn --log-config <inifile.ini> --paste <inifile.ini>
54 54 #use = egg:gunicorn#main
55 55 ## Sets the number of process workers. You must set `instance_id = *`
56 56 ## when this option is set to more than one worker, recommended
57 57 ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers
58 58 ## The `instance_id = *` must be set in the [app:main] section below
59 59 #workers = 1
60 60 ## number of threads for each of the worker, must be set to 1 for gevent
61 61 ## generally recommened to be at 1
62 62 #threads = 1
63 63 ## process name
64 64 #proc_name = rhodecode
65 65 ## type of worker class, one of sync, gevent
66 66 ## recommended for bigger setup is using of of other than sync one
67 67 #worker_class = sync
68 ## The maximum number of simultaneous clients. Valid only for Gevent
69 #worker_connections = 10
68 70 ## max number of requests that worker will handle before being gracefully
69 71 ## restarted, could prevent memory leaks
70 72 #max_requests = 1000
71 73 #max_requests_jitter = 30
72 74 ## ammount of time a worker can spend with handling a request before it
73 75 ## gets killed and restarted. Set to 6hrs
74 76 #timeout = 21600
75 77
76 78
77 79 ## prefix middleware for RhodeCode, disables force_https flag.
78 80 ## allows to set RhodeCode under a prefix in server.
79 81 ## eg https://server.com/<prefix>. Enable `filter-with =` option below as well.
80 82 #[filter:proxy-prefix]
81 83 #use = egg:PasteDeploy#prefix
82 84 #prefix = /<your-prefix>
83 85
84 86 [app:main]
85 87 use = egg:rhodecode-enterprise-ce
86 88 ## enable proxy prefix middleware, defined below
87 89 #filter-with = proxy-prefix
88 90
89 91 # During development the we want to have the debug toolbar enabled
90 92 pyramid.includes =
91 93 pyramid_debugtoolbar
92 94 rhodecode.utils.debugtoolbar
93 95 rhodecode.lib.middleware.request_wrapper
94 96
95 97 pyramid.reload_templates = true
96 98
97 99 debugtoolbar.hosts = 0.0.0.0/0
98 100 debugtoolbar.exclude_prefixes =
99 101 /css
100 102 /fonts
101 103 /images
102 104 /js
103 105
104 106 ## RHODECODE PLUGINS ##
105 107 rhodecode.includes =
106 108 rhodecode.api
107 109
108 110
109 111 # api prefix url
110 112 rhodecode.api.url = /_admin/api
111 113
112 114
113 115 ## END RHODECODE PLUGINS ##
114 116
115 117 full_stack = true
116 118
117 119 ## Serve static files via RhodeCode, disable to serve them via HTTP server
118 120 static_files = true
119 121
120 122 ## Optional Languages
121 123 ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh
122 124 lang = en
123 125
124 126 ## perform a full repository scan on each server start, this should be
125 127 ## set to false after first startup, to allow faster server restarts.
126 128 startup.import_repos = false
127 129
128 130 ## Uncomment and set this path to use archive download cache.
129 131 ## Once enabled, generated archives will be cached at this location
130 132 ## and served from the cache during subsequent requests for the same archive of
131 133 ## the repository.
132 134 #archive_cache_dir = /tmp/tarballcache
133 135
134 136 ## change this to unique ID for security
135 137 app_instance_uuid = rc-production
136 138
137 139 ## cut off limit for large diffs (size in bytes)
138 140 cut_off_limit_diff = 1024000
139 141 cut_off_limit_file = 256000
140 142
141 143 ## use cache version of scm repo everywhere
142 144 vcs_full_cache = true
143 145
144 146 ## force https in RhodeCode, fixes https redirects, assumes it's always https
145 147 ## Normally this is controlled by proper http flags sent from http server
146 148 force_https = false
147 149
148 150 ## use Strict-Transport-Security headers
149 151 use_htsts = false
150 152
151 153 ## number of commits stats will parse on each iteration
152 154 commit_parse_limit = 25
153 155
154 156 ## git rev filter option, --all is the default filter, if you need to
155 157 ## hide all refs in changelog switch this to --branches --tags
156 158 git_rev_filter = --branches --tags
157 159
158 160 # Set to true if your repos are exposed using the dumb protocol
159 161 git_update_server_info = false
160 162
161 163 ## RSS/ATOM feed options
162 164 rss_cut_off_limit = 256000
163 165 rss_items_per_page = 10
164 166 rss_include_diff = false
165 167
166 168 ## gist URL alias, used to create nicer urls for gist. This should be an
167 169 ## url that does rewrites to _admin/gists/<gistid>.
168 170 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
169 171 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
170 172 gist_alias_url =
171 173
172 174 ## List of controllers (using glob pattern syntax) that AUTH TOKENS could be
173 175 ## used for access.
174 176 ## Adding ?auth_token = <token> to the url authenticates this request as if it
175 177 ## came from the the logged in user who own this authentication token.
176 178 ##
177 179 ## Syntax is <ControllerClass>:<function_pattern>.
178 180 ## To enable access to raw_files put `FilesController:raw`.
179 181 ## To enable access to patches add `ChangesetController:changeset_patch`.
180 182 ## The list should be "," separated and on a single line.
181 183 ##
182 184 ## Recommended controllers to enable:
183 185 # ChangesetController:changeset_patch,
184 186 # ChangesetController:changeset_raw,
185 187 # FilesController:raw,
186 188 # FilesController:archivefile,
187 189 # GistsController:*,
188 190 api_access_controllers_whitelist =
189 191
190 192 ## default encoding used to convert from and to unicode
191 193 ## can be also a comma separated list of encoding in case of mixed encodings
192 194 default_encoding = UTF-8
193 195
194 196 ## instance-id prefix
195 197 ## a prefix key for this instance used for cache invalidation when running
196 198 ## multiple instances of rhodecode, make sure it's globally unique for
197 199 ## all running rhodecode instances. Leave empty if you don't use it
198 200 instance_id =
199 201
200 202 ## alternative return HTTP header for failed authentication. Default HTTP
201 203 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
202 204 ## handling that causing a series of failed authentication calls.
203 205 ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code
204 206 ## This will be served instead of default 401 on bad authnetication
205 207 auth_ret_code =
206 208
207 209 ## use special detection method when serving auth_ret_code, instead of serving
208 210 ## ret_code directly, use 401 initially (Which triggers credentials prompt)
209 211 ## and then serve auth_ret_code to clients
210 212 auth_ret_code_detection = false
211 213
212 214 ## locking return code. When repository is locked return this HTTP code. 2XX
213 215 ## codes don't break the transactions while 4XX codes do
214 216 lock_ret_code = 423
215 217
216 218 ## allows to change the repository location in settings page
217 219 allow_repo_location_change = true
218 220
219 221 ## allows to setup custom hooks in settings page
220 222 allow_custom_hooks_settings = true
221 223
222 224 ## generated license token, goto license page in RhodeCode settings to obtain
223 225 ## new token
224 226 license_token =
225 227
226 228 ## supervisor connection uri, for managing supervisor and logs.
227 229 supervisor.uri =
228 230 ## supervisord group name/id we only want this RC instance to handle
229 231 supervisor.group_id = dev
230 232
231 233 ## Display extended labs settings
232 234 labs_settings_active = true
233 235
234 236 ####################################
235 237 ### CELERY CONFIG ####
236 238 ####################################
237 239 use_celery = false
238 240 broker.host = localhost
239 241 broker.vhost = rabbitmqhost
240 242 broker.port = 5672
241 243 broker.user = rabbitmq
242 244 broker.password = qweqwe
243 245
244 246 celery.imports = rhodecode.lib.celerylib.tasks
245 247
246 248 celery.result.backend = amqp
247 249 celery.result.dburi = amqp://
248 250 celery.result.serialier = json
249 251
250 252 #celery.send.task.error.emails = true
251 253 #celery.amqp.task.result.expires = 18000
252 254
253 255 celeryd.concurrency = 2
254 256 #celeryd.log.file = celeryd.log
255 257 celeryd.log.level = debug
256 258 celeryd.max.tasks.per.child = 1
257 259
258 260 ## tasks will never be sent to the queue, but executed locally instead.
259 261 celery.always.eager = false
260 262
261 263 ####################################
262 264 ### BEAKER CACHE ####
263 265 ####################################
264 266 # default cache dir for templates. Putting this into a ramdisk
265 267 ## can boost performance, eg. %(here)s/data_ramdisk
266 268 cache_dir = %(here)s/data
267 269
268 270 ## locking and default file storage for Beaker. Putting this into a ramdisk
269 271 ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data
270 272 beaker.cache.data_dir = %(here)s/data/cache/beaker_data
271 273 beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock
272 274
273 275 beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long
274 276
275 277 beaker.cache.super_short_term.type = memory
276 278 beaker.cache.super_short_term.expire = 10
277 279 beaker.cache.super_short_term.key_length = 256
278 280
279 281 beaker.cache.short_term.type = memory
280 282 beaker.cache.short_term.expire = 60
281 283 beaker.cache.short_term.key_length = 256
282 284
283 285 beaker.cache.long_term.type = memory
284 286 beaker.cache.long_term.expire = 36000
285 287 beaker.cache.long_term.key_length = 256
286 288
287 289 beaker.cache.sql_cache_short.type = memory
288 290 beaker.cache.sql_cache_short.expire = 10
289 291 beaker.cache.sql_cache_short.key_length = 256
290 292
291 293 # default is memory cache, configure only if required
292 294 # using multi-node or multi-worker setup
293 295 #beaker.cache.auth_plugins.type = ext:database
294 296 #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock
295 297 #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode
296 298 #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode
297 299 #beaker.cache.auth_plugins.sa.pool_recycle = 3600
298 300 #beaker.cache.auth_plugins.sa.pool_size = 10
299 301 #beaker.cache.auth_plugins.sa.max_overflow = 0
300 302
301 303 beaker.cache.repo_cache_long.type = memorylru_base
302 304 beaker.cache.repo_cache_long.max_items = 4096
303 305 beaker.cache.repo_cache_long.expire = 2592000
304 306
305 307 # default is memorylru_base cache, configure only if required
306 308 # using multi-node or multi-worker setup
307 309 #beaker.cache.repo_cache_long.type = ext:memcached
308 310 #beaker.cache.repo_cache_long.url = localhost:11211
309 311 #beaker.cache.repo_cache_long.expire = 1209600
310 312 #beaker.cache.repo_cache_long.key_length = 256
311 313
312 314 ####################################
313 315 ### BEAKER SESSION ####
314 316 ####################################
315 317
316 318 ## .session.type is type of storage options for the session, current allowed
317 319 ## types are file, ext:memcached, ext:database, and memory(default).
318 320 beaker.session.type = file
319 321 beaker.session.data_dir = %(here)s/data/sessions/data
320 322
321 323 ## db based session, fast, and allows easy management over logged in users ##
322 324 #beaker.session.type = ext:database
323 325 #beaker.session.table_name = db_session
324 326 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
325 327 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
326 328 #beaker.session.sa.pool_recycle = 3600
327 329 #beaker.session.sa.echo = false
328 330
329 331 beaker.session.key = rhodecode
330 332 beaker.session.secret = develop-rc-uytcxaz
331 333 beaker.session.lock_dir = %(here)s/data/sessions/lock
332 334
333 335 ## Secure encrypted cookie. Requires AES and AES python libraries
334 336 ## you must disable beaker.session.secret to use this
335 337 #beaker.session.encrypt_key = <key_for_encryption>
336 338 #beaker.session.validate_key = <validation_key>
337 339
338 340 ## sets session as invalid(also logging out user) if it haven not been
339 341 ## accessed for given amount of time in seconds
340 342 beaker.session.timeout = 2592000
341 343 beaker.session.httponly = true
342 344 #beaker.session.cookie_path = /<your-prefix>
343 345
344 346 ## uncomment for https secure cookie
345 347 beaker.session.secure = false
346 348
347 349 ## auto save the session to not to use .save()
348 350 beaker.session.auto = false
349 351
350 352 ## default cookie expiration time in seconds, set to `true` to set expire
351 353 ## at browser close
352 354 #beaker.session.cookie_expires = 3600
353 355
354 356 ###################################
355 357 ## SEARCH INDEXING CONFIGURATION ##
356 358 ###################################
357 359
358 360 search.module = rhodecode.lib.index.whoosh
359 361 search.location = %(here)s/data/index
360 362
361 363 ###################################
362 364 ## ERROR AND LOG HANDLING SYSTEM ##
363 365 ###################################
364 366
365 367 ## Appenlight is tailored to work with RhodeCode, see
366 368 ## http://appenlight.com for details how to obtain an account
367 369
368 370 ## appenlight integration enabled
369 371 appenlight = false
370 372
371 373 appenlight.server_url = https://api.appenlight.com
372 374 appenlight.api_key = YOUR_API_KEY
373 375 ;appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
374 376
375 377 # used for JS client
376 378 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
377 379
378 380 ## TWEAK AMOUNT OF INFO SENT HERE
379 381
380 382 ## enables 404 error logging (default False)
381 383 appenlight.report_404 = false
382 384
383 385 ## time in seconds after request is considered being slow (default 1)
384 386 appenlight.slow_request_time = 1
385 387
386 388 ## record slow requests in application
387 389 ## (needs to be enabled for slow datastore recording and time tracking)
388 390 appenlight.slow_requests = true
389 391
390 392 ## enable hooking to application loggers
391 393 appenlight.logging = true
392 394
393 395 ## minimum log level for log capture
394 396 appenlight.logging.level = WARNING
395 397
396 398 ## send logs only from erroneous/slow requests
397 399 ## (saves API quota for intensive logging)
398 400 appenlight.logging_on_error = false
399 401
400 402 ## list of additonal keywords that should be grabbed from environ object
401 403 ## can be string with comma separated list of words in lowercase
402 404 ## (by default client will always send following info:
403 405 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
404 406 ## start with HTTP* this list be extended with additional keywords here
405 407 appenlight.environ_keys_whitelist =
406 408
407 409 ## list of keywords that should be blanked from request object
408 410 ## can be string with comma separated list of words in lowercase
409 411 ## (by default client will always blank keys that contain following words
410 412 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
411 413 ## this list be extended with additional keywords set here
412 414 appenlight.request_keys_blacklist =
413 415
414 416 ## list of namespaces that should be ignores when gathering log entries
415 417 ## can be string with comma separated list of namespaces
416 418 ## (by default the client ignores own entries: appenlight_client.client)
417 419 appenlight.log_namespace_blacklist =
418 420
419 421
420 422 ################################################################################
421 423 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
422 424 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
423 425 ## execute malicious code after an exception is raised. ##
424 426 ################################################################################
425 427 #set debug = false
426 428
427 429
428 430 ##############
429 431 ## STYLING ##
430 432 ##############
431 433 debug_style = true
432 434
433 435 #########################################################
434 436 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
435 437 #########################################################
436 438 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
437 439 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
438 440 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
439 441
440 442 # see sqlalchemy docs for other advanced settings
441 443
442 444 ## print the sql statements to output
443 445 sqlalchemy.db1.echo = false
444 446 ## recycle the connections after this ammount of seconds
445 447 sqlalchemy.db1.pool_recycle = 3600
446 448 sqlalchemy.db1.convert_unicode = true
447 449
448 450 ## the number of connections to keep open inside the connection pool.
449 451 ## 0 indicates no limit
450 452 #sqlalchemy.db1.pool_size = 5
451 453
452 454 ## the number of connections to allow in connection pool "overflow", that is
453 455 ## connections that can be opened above and beyond the pool_size setting,
454 456 ## which defaults to five.
455 457 #sqlalchemy.db1.max_overflow = 10
456 458
457 459
458 460 ##################
459 461 ### VCS CONFIG ###
460 462 ##################
461 463 vcs.server.enable = true
462 464 vcs.server = localhost:9900
463 465 # Available protocols: pyro4, http
464 466 vcs.server.protocol = pyro4
465 467
466 468 # available impl:
467 469 # vcsserver.scm_app (EE only, for testing),
468 470 # rhodecode.lib.middleware.utils.scm_app_http
469 471 # pyro4
470 472 #vcs.scm_app_implementation = rhodecode.lib.middleware.utils.scm_app_http
471 473
472 474 vcs.server.log_level = debug
473 475 vcs.start_server = true
474 476 vcs.backends = hg, git, svn
475 477 vcs.connection_timeout = 3600
476 478 ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
477 479 ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible
478 480 #vcs.svn.compatible_version = pre-1.8-compatible
479 481
480 482 ################################
481 483 ### LOGGING CONFIGURATION ####
482 484 ################################
483 485 [loggers]
484 486 keys = root, routes, rhodecode, sqlalchemy, beaker, pyro4, templates, whoosh_indexer
485 487
486 488 [handlers]
487 489 keys = console, console_sql
488 490
489 491 [formatters]
490 492 keys = generic, color_formatter, color_formatter_sql
491 493
492 494 #############
493 495 ## LOGGERS ##
494 496 #############
495 497 [logger_root]
496 498 level = NOTSET
497 499 handlers = console
498 500
499 501 [logger_routes]
500 502 level = DEBUG
501 503 handlers =
502 504 qualname = routes.middleware
503 505 ## "level = DEBUG" logs the route matched and routing variables.
504 506 propagate = 1
505 507
506 508 [logger_beaker]
507 509 level = DEBUG
508 510 handlers =
509 511 qualname = beaker.container
510 512 propagate = 1
511 513
512 514 [logger_pyro4]
513 515 level = DEBUG
514 516 handlers =
515 517 qualname = Pyro4
516 518 propagate = 1
517 519
518 520 [logger_templates]
519 521 level = INFO
520 522 handlers =
521 523 qualname = pylons.templating
522 524 propagate = 1
523 525
524 526 [logger_rhodecode]
525 527 level = DEBUG
526 528 handlers =
527 529 qualname = rhodecode
528 530 propagate = 1
529 531
530 532 [logger_sqlalchemy]
531 533 level = INFO
532 534 handlers = console_sql
533 535 qualname = sqlalchemy.engine
534 536 propagate = 0
535 537
536 538 [logger_whoosh_indexer]
537 539 level = DEBUG
538 540 handlers =
539 541 qualname = whoosh_indexer
540 542 propagate = 1
541 543
542 544 ##############
543 545 ## HANDLERS ##
544 546 ##############
545 547
546 548 [handler_console]
547 549 class = StreamHandler
548 550 args = (sys.stderr,)
549 551 level = DEBUG
550 552 formatter = color_formatter
551 553
552 554 [handler_console_sql]
553 555 class = StreamHandler
554 556 args = (sys.stderr,)
555 557 level = DEBUG
556 558 formatter = color_formatter_sql
557 559
558 560 ################
559 561 ## FORMATTERS ##
560 562 ################
561 563
562 564 [formatter_generic]
563 565 class = rhodecode.lib.logging_formatter.Pyro4AwareFormatter
564 566 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
565 567 datefmt = %Y-%m-%d %H:%M:%S
566 568
567 569 [formatter_color_formatter]
568 570 class = rhodecode.lib.logging_formatter.ColorFormatter
569 571 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
570 572 datefmt = %Y-%m-%d %H:%M:%S
571 573
572 574 [formatter_color_formatter_sql]
573 575 class = rhodecode.lib.logging_formatter.ColorFormatterSql
574 576 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
575 577 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,541 +1,543 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # RhodeCode Enterprise - configuration file #
4 4 # Built-in functions and variables #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 # #
7 7 ################################################################################
8 8
9 9 [DEFAULT]
10 10 debug = true
11 11 pdebug = false
12 12 ################################################################################
13 13 ## Uncomment and replace with the email address which should receive ##
14 14 ## any error reports after an application crash ##
15 15 ## Additionally these settings will be used by the RhodeCode mailing system ##
16 16 ################################################################################
17 17 #email_to = admin@localhost
18 18 #error_email_from = paste_error@localhost
19 19 #app_email_from = rhodecode-noreply@localhost
20 20 #error_message =
21 21 #email_prefix = [RhodeCode]
22 22
23 23 #smtp_server = mail.server.com
24 24 #smtp_username =
25 25 #smtp_password =
26 26 #smtp_port =
27 27 #smtp_use_tls = false
28 28 #smtp_use_ssl = true
29 29 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
30 30 #smtp_auth =
31 31
32 32 [server:main]
33 33 ## COMMON ##
34 34 host = 127.0.0.1
35 35 port = 5000
36 36
37 37 ##########################
38 38 ## WAITRESS WSGI SERVER ##
39 39 ##########################
40 40 use = egg:waitress#main
41 41 ## number of worker threads
42 42 threads = 5
43 43 ## MAX BODY SIZE 100GB
44 44 max_request_body_size = 107374182400
45 45 ## Use poll instead of select, fixes file descriptors limits problems.
46 46 ## May not work on old windows systems.
47 47 asyncore_use_poll = true
48 48
49 49
50 50 ##########################
51 51 ## GUNICORN WSGI SERVER ##
52 52 ##########################
53 53 ## run with gunicorn --log-config <inifile.ini> --paste <inifile.ini>
54 54 #use = egg:gunicorn#main
55 55 ## Sets the number of process workers. You must set `instance_id = *`
56 56 ## when this option is set to more than one worker, recommended
57 57 ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers
58 58 ## The `instance_id = *` must be set in the [app:main] section below
59 59 #workers = 1
60 60 ## number of threads for each of the worker, must be set to 1 for gevent
61 61 ## generally recommened to be at 1
62 62 #threads = 1
63 63 ## process name
64 64 #proc_name = rhodecode
65 65 ## type of worker class, one of sync, gevent
66 66 ## recommended for bigger setup is using of of other than sync one
67 67 #worker_class = sync
68 ## The maximum number of simultaneous clients. Valid only for Gevent
69 #worker_connections = 10
68 70 ## max number of requests that worker will handle before being gracefully
69 71 ## restarted, could prevent memory leaks
70 72 #max_requests = 1000
71 73 #max_requests_jitter = 30
72 74 ## ammount of time a worker can spend with handling a request before it
73 75 ## gets killed and restarted. Set to 6hrs
74 76 #timeout = 21600
75 77
76 78
77 79 ## prefix middleware for RhodeCode, disables force_https flag.
78 80 ## allows to set RhodeCode under a prefix in server.
79 81 ## eg https://server.com/<prefix>. Enable `filter-with =` option below as well.
80 82 #[filter:proxy-prefix]
81 83 #use = egg:PasteDeploy#prefix
82 84 #prefix = /<your-prefix>
83 85
84 86 [app:main]
85 87 use = egg:rhodecode-enterprise-ce
86 88 ## enable proxy prefix middleware, defined below
87 89 #filter-with = proxy-prefix
88 90
89 91 full_stack = true
90 92
91 93 ## Serve static files via RhodeCode, disable to serve them via HTTP server
92 94 static_files = true
93 95
94 96 ## Optional Languages
95 97 ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh
96 98 lang = en
97 99
98 100 ## perform a full repository scan on each server start, this should be
99 101 ## set to false after first startup, to allow faster server restarts.
100 102 startup.import_repos = false
101 103
102 104 ## Uncomment and set this path to use archive download cache.
103 105 ## Once enabled, generated archives will be cached at this location
104 106 ## and served from the cache during subsequent requests for the same archive of
105 107 ## the repository.
106 108 #archive_cache_dir = /tmp/tarballcache
107 109
108 110 ## change this to unique ID for security
109 111 app_instance_uuid = rc-production
110 112
111 113 ## cut off limit for large diffs (size in bytes)
112 114 cut_off_limit_diff = 1024000
113 115 cut_off_limit_file = 256000
114 116
115 117 ## use cache version of scm repo everywhere
116 118 vcs_full_cache = true
117 119
118 120 ## force https in RhodeCode, fixes https redirects, assumes it's always https
119 121 ## Normally this is controlled by proper http flags sent from http server
120 122 force_https = false
121 123
122 124 ## use Strict-Transport-Security headers
123 125 use_htsts = false
124 126
125 127 ## number of commits stats will parse on each iteration
126 128 commit_parse_limit = 25
127 129
128 130 ## git rev filter option, --all is the default filter, if you need to
129 131 ## hide all refs in changelog switch this to --branches --tags
130 132 git_rev_filter = --branches --tags
131 133
132 134 # Set to true if your repos are exposed using the dumb protocol
133 135 git_update_server_info = false
134 136
135 137 ## RSS/ATOM feed options
136 138 rss_cut_off_limit = 256000
137 139 rss_items_per_page = 10
138 140 rss_include_diff = false
139 141
140 142 ## gist URL alias, used to create nicer urls for gist. This should be an
141 143 ## url that does rewrites to _admin/gists/<gistid>.
142 144 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
143 145 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
144 146 gist_alias_url =
145 147
146 148 ## List of controllers (using glob pattern syntax) that AUTH TOKENS could be
147 149 ## used for access.
148 150 ## Adding ?auth_token = <token> to the url authenticates this request as if it
149 151 ## came from the the logged in user who own this authentication token.
150 152 ##
151 153 ## Syntax is <ControllerClass>:<function_pattern>.
152 154 ## To enable access to raw_files put `FilesController:raw`.
153 155 ## To enable access to patches add `ChangesetController:changeset_patch`.
154 156 ## The list should be "," separated and on a single line.
155 157 ##
156 158 ## Recommended controllers to enable:
157 159 # ChangesetController:changeset_patch,
158 160 # ChangesetController:changeset_raw,
159 161 # FilesController:raw,
160 162 # FilesController:archivefile,
161 163 # GistsController:*,
162 164 api_access_controllers_whitelist =
163 165
164 166 ## default encoding used to convert from and to unicode
165 167 ## can be also a comma separated list of encoding in case of mixed encodings
166 168 default_encoding = UTF-8
167 169
168 170 ## instance-id prefix
169 171 ## a prefix key for this instance used for cache invalidation when running
170 172 ## multiple instances of rhodecode, make sure it's globally unique for
171 173 ## all running rhodecode instances. Leave empty if you don't use it
172 174 instance_id =
173 175
174 176 ## alternative return HTTP header for failed authentication. Default HTTP
175 177 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
176 178 ## handling that causing a series of failed authentication calls.
177 179 ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code
178 180 ## This will be served instead of default 401 on bad authnetication
179 181 auth_ret_code =
180 182
181 183 ## use special detection method when serving auth_ret_code, instead of serving
182 184 ## ret_code directly, use 401 initially (Which triggers credentials prompt)
183 185 ## and then serve auth_ret_code to clients
184 186 auth_ret_code_detection = false
185 187
186 188 ## locking return code. When repository is locked return this HTTP code. 2XX
187 189 ## codes don't break the transactions while 4XX codes do
188 190 lock_ret_code = 423
189 191
190 192 ## allows to change the repository location in settings page
191 193 allow_repo_location_change = true
192 194
193 195 ## allows to setup custom hooks in settings page
194 196 allow_custom_hooks_settings = true
195 197
196 198 ## generated license token, goto license page in RhodeCode settings to obtain
197 199 ## new token
198 200 license_token =
199 201
200 202 ## supervisor connection uri, for managing supervisor and logs.
201 203 supervisor.uri =
202 204 ## supervisord group name/id we only want this RC instance to handle
203 205 supervisor.group_id = prod
204 206
205 207 ## Display extended labs settings
206 208 labs_settings_active = true
207 209
208 210 ####################################
209 211 ### CELERY CONFIG ####
210 212 ####################################
211 213 use_celery = false
212 214 broker.host = localhost
213 215 broker.vhost = rabbitmqhost
214 216 broker.port = 5672
215 217 broker.user = rabbitmq
216 218 broker.password = qweqwe
217 219
218 220 celery.imports = rhodecode.lib.celerylib.tasks
219 221
220 222 celery.result.backend = amqp
221 223 celery.result.dburi = amqp://
222 224 celery.result.serialier = json
223 225
224 226 #celery.send.task.error.emails = true
225 227 #celery.amqp.task.result.expires = 18000
226 228
227 229 celeryd.concurrency = 2
228 230 #celeryd.log.file = celeryd.log
229 231 celeryd.log.level = debug
230 232 celeryd.max.tasks.per.child = 1
231 233
232 234 ## tasks will never be sent to the queue, but executed locally instead.
233 235 celery.always.eager = false
234 236
235 237 ####################################
236 238 ### BEAKER CACHE ####
237 239 ####################################
238 240 # default cache dir for templates. Putting this into a ramdisk
239 241 ## can boost performance, eg. %(here)s/data_ramdisk
240 242 cache_dir = %(here)s/data
241 243
242 244 ## locking and default file storage for Beaker. Putting this into a ramdisk
243 245 ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data
244 246 beaker.cache.data_dir = %(here)s/data/cache/beaker_data
245 247 beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock
246 248
247 249 beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long
248 250
249 251 beaker.cache.super_short_term.type = memory
250 252 beaker.cache.super_short_term.expire = 10
251 253 beaker.cache.super_short_term.key_length = 256
252 254
253 255 beaker.cache.short_term.type = memory
254 256 beaker.cache.short_term.expire = 60
255 257 beaker.cache.short_term.key_length = 256
256 258
257 259 beaker.cache.long_term.type = memory
258 260 beaker.cache.long_term.expire = 36000
259 261 beaker.cache.long_term.key_length = 256
260 262
261 263 beaker.cache.sql_cache_short.type = memory
262 264 beaker.cache.sql_cache_short.expire = 10
263 265 beaker.cache.sql_cache_short.key_length = 256
264 266
265 267 # default is memory cache, configure only if required
266 268 # using multi-node or multi-worker setup
267 269 #beaker.cache.auth_plugins.type = ext:database
268 270 #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock
269 271 #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode
270 272 #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode
271 273 #beaker.cache.auth_plugins.sa.pool_recycle = 3600
272 274 #beaker.cache.auth_plugins.sa.pool_size = 10
273 275 #beaker.cache.auth_plugins.sa.max_overflow = 0
274 276
275 277 beaker.cache.repo_cache_long.type = memorylru_base
276 278 beaker.cache.repo_cache_long.max_items = 4096
277 279 beaker.cache.repo_cache_long.expire = 2592000
278 280
279 281 # default is memorylru_base cache, configure only if required
280 282 # using multi-node or multi-worker setup
281 283 #beaker.cache.repo_cache_long.type = ext:memcached
282 284 #beaker.cache.repo_cache_long.url = localhost:11211
283 285 #beaker.cache.repo_cache_long.expire = 1209600
284 286 #beaker.cache.repo_cache_long.key_length = 256
285 287
286 288 ####################################
287 289 ### BEAKER SESSION ####
288 290 ####################################
289 291
290 292 ## .session.type is type of storage options for the session, current allowed
291 293 ## types are file(default), ext:memcached, ext:database, and memory.
292 294 #beaker.session.type = file
293 295
294 296 ## db based session, fast, and allows easy management over logged in users ##
295 297 #beaker.session.type = ext:database
296 298 #beaker.session.lock_dir = %(here)s/data/cache/session_db_lock
297 299 #beaker.session.table_name = db_session
298 300 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
299 301 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
300 302 #beaker.session.sa.pool_recycle = 3600
301 303 #beaker.session.sa.echo = false
302 304
303 305 beaker.session.key = rhodecode
304 306 beaker.session.secret = production-rc-uytcxaz
305 307
306 308 ## Secure encrypted cookie. Requires AES and AES python libraries
307 309 ## you must disable beaker.session.secret to use this
308 310 #beaker.session.encrypt_key = <key_for_encryption>
309 311 #beaker.session.validate_key = <validation_key>
310 312
311 313 ## sets session as invalid(also logging out user) if it haven not been
312 314 ## accessed for given amount of time in seconds
313 315 beaker.session.timeout = 2592000
314 316 beaker.session.httponly = true
315 317 #beaker.session.cookie_path = /<your-prefix>
316 318
317 319 ## uncomment for https secure cookie
318 320 beaker.session.secure = false
319 321
320 322 ## auto save the session to not to use .save()
321 323 beaker.session.auto = false
322 324
323 325 ## default cookie expiration time in seconds, set to `true` to set expire
324 326 ## at browser close
325 327 #beaker.session.cookie_expires = 3600
326 328
327 329 ###################################
328 330 ## SEARCH INDEXING CONFIGURATION ##
329 331 ###################################
330 332
331 333 search.module = rhodecode.lib.index.whoosh
332 334 search.location = %(here)s/data/index
333 335
334 336 ###################################
335 337 ## ERROR AND LOG HANDLING SYSTEM ##
336 338 ###################################
337 339
338 340 ## Appenlight is tailored to work with RhodeCode, see
339 341 ## http://appenlight.com for details how to obtain an account
340 342
341 343 ## appenlight integration enabled
342 344 appenlight = false
343 345
344 346 appenlight.server_url = https://api.appenlight.com
345 347 appenlight.api_key = YOUR_API_KEY
346 348 ;appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
347 349
348 350 # used for JS client
349 351 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
350 352
351 353 ## TWEAK AMOUNT OF INFO SENT HERE
352 354
353 355 ## enables 404 error logging (default False)
354 356 appenlight.report_404 = false
355 357
356 358 ## time in seconds after request is considered being slow (default 1)
357 359 appenlight.slow_request_time = 1
358 360
359 361 ## record slow requests in application
360 362 ## (needs to be enabled for slow datastore recording and time tracking)
361 363 appenlight.slow_requests = true
362 364
363 365 ## enable hooking to application loggers
364 366 appenlight.logging = true
365 367
366 368 ## minimum log level for log capture
367 369 appenlight.logging.level = WARNING
368 370
369 371 ## send logs only from erroneous/slow requests
370 372 ## (saves API quota for intensive logging)
371 373 appenlight.logging_on_error = false
372 374
373 375 ## list of additonal keywords that should be grabbed from environ object
374 376 ## can be string with comma separated list of words in lowercase
375 377 ## (by default client will always send following info:
376 378 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
377 379 ## start with HTTP* this list be extended with additional keywords here
378 380 appenlight.environ_keys_whitelist =
379 381
380 382 ## list of keywords that should be blanked from request object
381 383 ## can be string with comma separated list of words in lowercase
382 384 ## (by default client will always blank keys that contain following words
383 385 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
384 386 ## this list be extended with additional keywords set here
385 387 appenlight.request_keys_blacklist =
386 388
387 389 ## list of namespaces that should be ignores when gathering log entries
388 390 ## can be string with comma separated list of namespaces
389 391 ## (by default the client ignores own entries: appenlight_client.client)
390 392 appenlight.log_namespace_blacklist =
391 393
392 394
393 395 ################################################################################
394 396 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
395 397 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
396 398 ## execute malicious code after an exception is raised. ##
397 399 ################################################################################
398 400 set debug = false
399 401
400 402
401 403 ##############
402 404 ## STYLING ##
403 405 ##############
404 406 debug_style = false
405 407
406 408 #########################################################
407 409 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
408 410 #########################################################
409 411 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
410 412 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
411 413 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
412 414
413 415 # see sqlalchemy docs for other advanced settings
414 416
415 417 ## print the sql statements to output
416 418 sqlalchemy.db1.echo = false
417 419 ## recycle the connections after this ammount of seconds
418 420 sqlalchemy.db1.pool_recycle = 3600
419 421 sqlalchemy.db1.convert_unicode = true
420 422
421 423 ## the number of connections to keep open inside the connection pool.
422 424 ## 0 indicates no limit
423 425 #sqlalchemy.db1.pool_size = 5
424 426
425 427 ## the number of connections to allow in connection pool "overflow", that is
426 428 ## connections that can be opened above and beyond the pool_size setting,
427 429 ## which defaults to five.
428 430 #sqlalchemy.db1.max_overflow = 10
429 431
430 432
431 433 ##################
432 434 ### VCS CONFIG ###
433 435 ##################
434 436 vcs.server.enable = true
435 437 vcs.server = localhost:9900
436 438 # Available protocols: pyro4, http
437 439 vcs.server.protocol = pyro4
438 440 vcs.server.log_level = info
439 441 vcs.start_server = false
440 442 vcs.backends = hg, git, svn
441 443 vcs.connection_timeout = 3600
442 444 ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
443 445 ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible
444 446 #vcs.svn.compatible_version = pre-1.8-compatible
445 447
446 448 ################################
447 449 ### LOGGING CONFIGURATION ####
448 450 ################################
449 451 [loggers]
450 452 keys = root, routes, rhodecode, sqlalchemy, beaker, pyro4, templates, whoosh_indexer
451 453
452 454 [handlers]
453 455 keys = console, console_sql
454 456
455 457 [formatters]
456 458 keys = generic, color_formatter, color_formatter_sql
457 459
458 460 #############
459 461 ## LOGGERS ##
460 462 #############
461 463 [logger_root]
462 464 level = NOTSET
463 465 handlers = console
464 466
465 467 [logger_routes]
466 468 level = DEBUG
467 469 handlers =
468 470 qualname = routes.middleware
469 471 ## "level = DEBUG" logs the route matched and routing variables.
470 472 propagate = 1
471 473
472 474 [logger_beaker]
473 475 level = DEBUG
474 476 handlers =
475 477 qualname = beaker.container
476 478 propagate = 1
477 479
478 480 [logger_pyro4]
479 481 level = DEBUG
480 482 handlers =
481 483 qualname = Pyro4
482 484 propagate = 1
483 485
484 486 [logger_templates]
485 487 level = INFO
486 488 handlers =
487 489 qualname = pylons.templating
488 490 propagate = 1
489 491
490 492 [logger_rhodecode]
491 493 level = DEBUG
492 494 handlers =
493 495 qualname = rhodecode
494 496 propagate = 1
495 497
496 498 [logger_sqlalchemy]
497 499 level = INFO
498 500 handlers = console_sql
499 501 qualname = sqlalchemy.engine
500 502 propagate = 0
501 503
502 504 [logger_whoosh_indexer]
503 505 level = DEBUG
504 506 handlers =
505 507 qualname = whoosh_indexer
506 508 propagate = 1
507 509
508 510 ##############
509 511 ## HANDLERS ##
510 512 ##############
511 513
512 514 [handler_console]
513 515 class = StreamHandler
514 516 args = (sys.stderr,)
515 517 level = INFO
516 518 formatter = generic
517 519
518 520 [handler_console_sql]
519 521 class = StreamHandler
520 522 args = (sys.stderr,)
521 523 level = WARN
522 524 formatter = generic
523 525
524 526 ################
525 527 ## FORMATTERS ##
526 528 ################
527 529
528 530 [formatter_generic]
529 531 class = rhodecode.lib.logging_formatter.Pyro4AwareFormatter
530 532 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
531 533 datefmt = %Y-%m-%d %H:%M:%S
532 534
533 535 [formatter_color_formatter]
534 536 class = rhodecode.lib.logging_formatter.ColorFormatter
535 537 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
536 538 datefmt = %Y-%m-%d %H:%M:%S
537 539
538 540 [formatter_color_formatter_sql]
539 541 class = rhodecode.lib.logging_formatter.ColorFormatterSql
540 542 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
541 543 datefmt = %Y-%m-%d %H:%M:%S
General Comments 0
You need to be logged in to leave comments. Login now