diff options
author | 2023-01-26 15:12:48 +0100 | |
---|---|---|
committer | 2023-01-26 15:12:48 +0100 | |
commit | 782169da765baf1d651c1b71e5f974f762c92d8e (patch) | |
tree | 073d78698a911af2ac37a2a64bf5ae57406fc38c /internal/config/defaults.go | |
parent | [feature] Public list of suspended domains (#1362) (diff) | |
download | gotosocial-782169da765baf1d651c1b71e5f974f762c92d8e.tar.xz |
[chore] set max open / idle conns + conn max lifetime for both postgres and sqlite (#1369)
* [chore] set max open / idle conns + conn max lifetime for both postgres and sqlite
* reduce cache size default to 8MiB, reduce connections to 2 * cpu
* introduce max open conns multiplier, tune sqlite and pg separately
* go fmt
Diffstat (limited to 'internal/config/defaults.go')
-rw-r--r-- | internal/config/defaults.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/internal/config/defaults.go b/internal/config/defaults.go index ecd32be2f..6b4c5db17 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -40,18 +40,19 @@ var Defaults = Configuration{ Port: 8080, TrustedProxies: []string{"127.0.0.1/32", "::1"}, // localhost - DbType: "postgres", - DbAddress: "", - DbPort: 5432, - DbUser: "", - DbPassword: "", - DbDatabase: "gotosocial", - DbTLSMode: "disable", - DbTLSCACert: "", - DbSqliteJournalMode: "WAL", - DbSqliteSynchronous: "NORMAL", - DbSqliteCacheSize: 64 * bytesize.MiB, - DbSqliteBusyTimeout: time.Minute * 5, + DbType: "postgres", + DbAddress: "", + DbPort: 5432, + DbUser: "", + DbPassword: "", + DbDatabase: "gotosocial", + DbTLSMode: "disable", + DbTLSCACert: "", + DbMaxOpenConnsMultiplier: 8, + DbSqliteJournalMode: "WAL", + DbSqliteSynchronous: "NORMAL", + DbSqliteCacheSize: 8 * bytesize.MiB, + DbSqliteBusyTimeout: time.Minute * 5, WebTemplateBaseDir: "./web/template/", WebAssetBaseDir: "./web/assets/", |