File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,15 @@ section for more information on configuring the database.
147
147
148
148
Note that these are used to configure `DATABASE` in `configuration.py`.
149
149
150
+ [source,yaml]
151
+ ----
152
+ netbox_database_conn_age: 300
153
+ ----
154
+
155
+ To configure Netbox to keep database connections open longer than a single requests,
156
+ set `netbox_database_conn_age` to your preferred maximum connection age, in seconds.
157
+ 300 seconds (5 minutes) is typically a good number to start with.
158
+
150
159
[source,yaml]
151
160
----
152
161
netbox_redis_host: 127.0.0.1
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ netbox_database_user: netbox
20
20
# netbox_database_host: localhost
21
21
netbox_database_port : 5432
22
22
# netbox_database_socket: /var/run/postgresql
23
+ netbox_database_conn_age : 0
23
24
24
25
netbox_redis_host : 127.0.0.1
25
26
netbox_redis_port : 6379
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ DATABASE = {
11
11
{% else % }
12
12
'HOST' : '{{ netbox_database_socket }}' ,
13
13
{% endif % }
14
+ 'CONN_MAX_AGE' : {{ netbox_database_conn_age }},
14
15
}
15
16
16
- REDIS = {
17
+ REDIS = {
17
18
'HOST' : '{{ netbox_redis_host }}' ,
18
19
'PORT' : '{{ netbox_redis_port }}' ,
19
20
'PASSWORD' : '{{ netbox_redis_password }}' ,
You can’t perform that action at this time.
0 commit comments