diff options
author | zeripath <art27@cantab.net> | 2019-10-21 22:20:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-21 22:20:47 +0100 |
commit | d8161ee3fd5d2991f70523b03421af4e6cf5b513 (patch) | |
tree | a8b50be951b69c6d2a10ebaf514ed2bede7f750b /docs | |
parent | 73f8069249f2b88bbe42a8fc3db06f0e91719200 (diff) | |
download | gitea-d8161ee3fd5d2991f70523b03421af4e6cf5b513.tar.gz gitea-d8161ee3fd5d2991f70523b03421af4e6cf5b513.zip |
Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528)
* Expose db.SetMaxOpenConns and allow other dbs to set their connection params
* Add note about port exhaustion
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/doc/advanced/config-cheat-sheet.en-us.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md index 678f8df238..f99e9f661a 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md +++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md @@ -192,8 +192,12 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `LOG_SQL`: **true**: Log the executed SQL. - `DB_RETRIES`: **10**: How many ORM init / DB connect attempts allowed. - `DB_RETRY_BACKOFF`: **3s**: time.Duration to wait before trying another ORM init / DB connect attempt, if failure occured. -- `MAX_IDLE_CONNS` **0**: Max idle database connections on connnection pool, default is 0 -- `CONN_MAX_LIFETIME` **3s**: Database connection max lifetime +- `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit. +- `MAX_IDLE_CONNS` **2**: Max idle database connections on connnection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`. +- `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL where it is 3s - see #6804 & #7071). + +Please see #8540 & #8273 for further discussion of the appropriate values for `MAX_OPEN_CONNS`, `MAX_IDLE_CONNS` & `CONN_MAX_LIFETIME` and their +relation to port exhaustion. ## Indexer (`indexer`) |