Show More
@@ -567,10 +567,14 b' def add_events_routes(config):' | |||
|
567 | 567 | |
|
568 | 568 | |
|
569 | 569 | def bootstrap_config(request, registry_name='RcTestRegistry'): |
|
570 | from rhodecode.config.middleware import sanitize_settings_and_apply_defaults | |
|
570 | 571 | import pyramid.testing |
|
571 | 572 | registry = pyramid.testing.Registry(registry_name) |
|
572 | 573 | |
|
574 | global_config = {'__file__': ''} | |
|
575 | ||
|
573 | 576 | config = pyramid.testing.setUp(registry=registry, request=request) |
|
577 | sanitize_settings_and_apply_defaults(global_config, config.registry.settings) | |
|
574 | 578 | |
|
575 | 579 | # allow pyramid lookup in testing |
|
576 | 580 | config.include('pyramid_mako') |
@@ -32,7 +32,6 b' from socketserver import TCPServer' | |||
|
32 | 32 | import rhodecode |
|
33 | 33 | from rhodecode.lib.exceptions import HTTPLockedRC, HTTPBranchProtected |
|
34 | 34 | from rhodecode.model import meta |
|
35 | from rhodecode.lib.base import bootstrap_request, bootstrap_config | |
|
36 | 35 | from rhodecode.lib import hooks_base |
|
37 | 36 | from rhodecode.lib.utils2 import AttributeDict |
|
38 | 37 | from rhodecode.lib.ext_json import json |
@@ -31,6 +31,7 b' import resource' | |||
|
31 | 31 | |
|
32 | 32 | import configparser |
|
33 | 33 | |
|
34 | from rc_license.models import LicenseModel | |
|
34 | 35 | from rhodecode.lib.str_utils import safe_str |
|
35 | 36 | |
|
36 | 37 | log = logging.getLogger(__name__) |
@@ -684,7 +685,7 b' def rhodecode_config():' | |||
|
684 | 685 | rhodecode_ini_safe['server:main'] = parsed_ini |
|
685 | 686 | |
|
686 | 687 | blacklist = [ |
|
687 |
'rhodecode_ |
|
|
688 | f'rhodecode_{LicenseModel.LICENSE_DB_KEY}', | |
|
688 | 689 | 'routes.map', |
|
689 | 690 | 'sqlalchemy.db1.url', |
|
690 | 691 | 'channelstream.secret', |
@@ -26,94 +26,21 b' debug = true' | |||
|
26 | 26 | #smtp_use_ssl = true |
|
27 | 27 | |
|
28 | 28 | [server:main] |
|
29 | ; COMMON HOST/IP CONFIG | |
|
30 | host = 0.0.0.0 | |
|
31 | port = 5000 | |
|
29 | ; COMMON HOST/IP CONFIG, This applies mostly to develop setup, | |
|
30 | ; Host port for gunicorn are controlled by gunicorn_conf.py | |
|
31 | host = 127.0.0.1 | |
|
32 | port = 10020 | |
|
32 | 33 | |
|
33 | 34 | |
|
34 | 35 | ; ########################### |
|
35 | 36 | ; GUNICORN APPLICATION SERVER |
|
36 | 37 | ; ########################### |
|
37 | 38 | |
|
38 |
; run with gunicorn -- |
|
|
39 | ; run with gunicorn --paste rhodecode.ini --config gunicorn_conf.py | |
|
39 | 40 | |
|
40 | 41 | ; Module to use, this setting shouldn't be changed |
|
41 | 42 | use = egg:gunicorn#main |
|
42 | 43 | |
|
43 | ; Sets the number of process workers. More workers means more concurrent connections | |
|
44 | ; RhodeCode can handle at the same time. Each additional worker also it increases | |
|
45 | ; memory usage as each has it's own set of caches. | |
|
46 | ; Recommended value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers, but no more | |
|
47 | ; than 8-10 unless for really big deployments .e.g 700-1000 users. | |
|
48 | ; `instance_id = *` must be set in the [app:main] section below (which is the default) | |
|
49 | ; when using more than 1 worker. | |
|
50 | #workers = 2 | |
|
51 | ||
|
52 | ; Gunicorn access log level | |
|
53 | #loglevel = info | |
|
54 | ||
|
55 | ; Process name visible in process list | |
|
56 | #proc_name = rhodecode | |
|
57 | ||
|
58 | ; Type of worker class, one of `sync`, `gevent` | |
|
59 | ; Recommended type is `gevent` | |
|
60 | #worker_class = gevent | |
|
61 | ||
|
62 | ; The maximum number of simultaneous clients per worker. Valid only for gevent | |
|
63 | #worker_connections = 10 | |
|
64 | ||
|
65 | ; The maximum number of pending connections worker will queue to handle | |
|
66 | #backlog = 64 | |
|
67 | ||
|
68 | ; Max number of requests that worker will handle before being gracefully restarted. | |
|
69 | ; Prevents memory leaks, jitter adds variability so not all workers are restarted at once. | |
|
70 | #max_requests = 1000 | |
|
71 | #max_requests_jitter = 30 | |
|
72 | ||
|
73 | ; Amount of time a worker can spend with handling a request before it | |
|
74 | ; gets killed and restarted. By default set to 21600 (6hrs) | |
|
75 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) | |
|
76 | #timeout = 21600 | |
|
77 | ||
|
78 | ; The maximum size of HTTP request line in bytes. | |
|
79 | ; 0 for unlimited | |
|
80 | #limit_request_line = 0 | |
|
81 | ||
|
82 | ; Limit the number of HTTP headers fields in a request. | |
|
83 | ; By default this value is 100 and can't be larger than 32768. | |
|
84 | #limit_request_fields = 32768 | |
|
85 | ||
|
86 | ; Limit the allowed size of an HTTP request header field. | |
|
87 | ; Value is a positive number or 0. | |
|
88 | ; Setting it to 0 will allow unlimited header field sizes. | |
|
89 | #limit_request_field_size = 0 | |
|
90 | ||
|
91 | ; Timeout for graceful workers restart. | |
|
92 | ; After receiving a restart signal, workers have this much time to finish | |
|
93 | ; serving requests. Workers still alive after the timeout (starting from the | |
|
94 | ; receipt of the restart signal) are force killed. | |
|
95 | ; Examples: 1800 (30min), 3600 (1hr), 7200 (2hr), 43200 (12h) | |
|
96 | #graceful_timeout = 3600 | |
|
97 | ||
|
98 | # The number of seconds to wait for requests on a Keep-Alive connection. | |
|
99 | # Generally set in the 1-5 seconds range. | |
|
100 | #keepalive = 2 | |
|
101 | ||
|
102 | ; Maximum memory usage that each worker can use before it will receive a | |
|
103 | ; graceful restart signal 0 = memory monitoring is disabled | |
|
104 | ; Examples: 268435456 (256MB), 536870912 (512MB) | |
|
105 | ; 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB) | |
|
106 | #memory_max_usage = 0 | |
|
107 | ||
|
108 | ; How often in seconds to check for memory usage for each gunicorn worker | |
|
109 | #memory_usage_check_interval = 60 | |
|
110 | ||
|
111 | ; Threshold value for which we don't recycle worker if GarbageCollection | |
|
112 | ; frees up enough resources. Before each restart we try to run GC on worker | |
|
113 | ; in case we get enough free memory after that, restart will not happen. | |
|
114 | #memory_usage_recovery_threshold = 0.8 | |
|
115 | ||
|
116 | ||
|
117 | 44 | ; Prefix middleware for RhodeCode. |
|
118 | 45 | ; recommended when using proxy setup. |
|
119 | 46 | ; allows to set RhodeCode under a prefix in server. |
@@ -579,6 +506,9 b' sqlalchemy.db1.pool_recycle = 3600' | |||
|
579 | 506 | |
|
580 | 507 | ; the number of connections to keep open inside the connection pool. |
|
581 | 508 | ; 0 indicates no limit |
|
509 | ; the general calculus with gevent is: | |
|
510 | ; if your system allows 500 concurrent greenlets (max_connections) that all do database access, | |
|
511 | ; then increase pool size + max overflow so that they add up to 500. | |
|
582 | 512 | #sqlalchemy.db1.pool_size = 5 |
|
583 | 513 | |
|
584 | 514 | ; The number of connections to allow in connection pool "overflow", that is |
@@ -594,7 +524,6 b' sqlalchemy.db1.pool_recycle = 3600' | |||
|
594 | 524 | ; VCS CONFIG |
|
595 | 525 | ; ########## |
|
596 | 526 | vcs.server.enable = true |
|
597 | #vcs.server = localhost:9901 | |
|
598 | 527 | vcs.server = vcsserver:10010 |
|
599 | 528 | |
|
600 | 529 | ; Web server connectivity protocol, responsible for web based VCS operations |
@@ -709,7 +638,7 b' ssh.executable.svn = ~/.rccontrol/vcsser' | |||
|
709 | 638 | ssh.enable_ui_key_generator = true |
|
710 | 639 | |
|
711 | 640 | ; Statsd client config, this is used to send metrics to statsd |
|
712 |
; We recommend setting statsd_exported and scrape them using Prometh |
|
|
641 | ; We recommend setting statsd_exported and scrape them using Prometheus | |
|
713 | 642 | #statsd.enabled = false |
|
714 | 643 | #statsd.statsd_host = 0.0.0.0 |
|
715 | 644 | #statsd.statsd_port = 8125 |
General Comments 0
You need to be logged in to leave comments.
Login now