mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Add CONN_MAX_AGE to documentation (#3642)
* Add CONN_MAX_AGE to sample configurations * Correct alignment * Restore ghost space * Correct alignment. * Use stable docs url
This commit is contained in:
parent
fdbf41e9fd
commit
eaeb52de20
@ -21,6 +21,7 @@ NetBox requires access to a PostgreSQL database service to store data. This serv
|
|||||||
* `PASSWORD` - PostgreSQL password
|
* `PASSWORD` - PostgreSQL password
|
||||||
* `HOST` - Name or IP address of the database server (use `localhost` if running locally)
|
* `HOST` - Name or IP address of the database server (use `localhost` if running locally)
|
||||||
* `PORT` - TCP port of the PostgreSQL service; leave blank for default port (5432)
|
* `PORT` - TCP port of the PostgreSQL service; leave blank for default port (5432)
|
||||||
|
* `CONN_MAX_AGE` - Number in seconds for Netbox to keep database connections open. 150-300 seconds is typically a good starting point ([more info](https://docs.djangoproject.com/en/stable/ref/databases/#persistent-connections)).
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -31,6 +32,7 @@ DATABASE = {
|
|||||||
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
|
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
|
||||||
'HOST': 'localhost', # Database server
|
'HOST': 'localhost', # Database server
|
||||||
'PORT': '', # Database port (leave blank for default)
|
'PORT': '', # Database port (leave blank for default)
|
||||||
|
'CONN_MAX_AGE': 300, # Max database connection age
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -129,6 +129,7 @@ DATABASE = {
|
|||||||
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
|
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
|
||||||
'HOST': 'localhost', # Database server
|
'HOST': 'localhost', # Database server
|
||||||
'PORT': '', # Database port (leave blank for default)
|
'PORT': '', # Database port (leave blank for default)
|
||||||
|
'CONN_MAX_AGE': 300, # Max database connection age
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ DATABASE = {
|
|||||||
'PASSWORD': '', # PostgreSQL password
|
'PASSWORD': '', # PostgreSQL password
|
||||||
'HOST': 'localhost', # Database server
|
'HOST': 'localhost', # Database server
|
||||||
'PORT': '', # Database port (leave blank for default)
|
'PORT': '', # Database port (leave blank for default)
|
||||||
|
'CONN_MAX_AGE': 300, # Max database connection age
|
||||||
}
|
}
|
||||||
|
|
||||||
# This key is used for secure generation of random numbers and strings. It must never be exposed outside of this file.
|
# This key is used for secure generation of random numbers and strings. It must never be exposed outside of this file.
|
||||||
|
Loading…
Reference in New Issue
Block a user