diff options
author | 2023-01-26 15:12:48 +0100 | |
---|---|---|
committer | 2023-01-26 15:12:48 +0100 | |
commit | 782169da765baf1d651c1b71e5f974f762c92d8e (patch) | |
tree | 073d78698a911af2ac37a2a64bf5ae57406fc38c /testrig/config.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 'testrig/config.go')
-rw-r--r-- | testrig/config.go | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/testrig/config.go b/testrig/config.go index b6a7b4c83..140d73e6a 100644 --- a/testrig/config.go +++ b/testrig/config.go @@ -46,16 +46,19 @@ var testDefaults = config.Configuration{ Port: 8080, TrustedProxies: []string{"127.0.0.1/32", "::1"}, - DbType: "sqlite", - DbAddress: ":memory:", - DbPort: 5432, - DbUser: "postgres", - DbPassword: "postgres", - DbDatabase: "postgres", - DbSqliteJournalMode: "WAL", - DbSqliteSynchronous: "NORMAL", - DbSqliteCacheSize: 64 * bytesize.MiB, - DbSqliteBusyTimeout: time.Minute * 5, + DbType: "sqlite", + DbAddress: ":memory:", + DbPort: 5432, + DbUser: "postgres", + DbPassword: "postgres", + DbDatabase: "postgres", + DbTLSMode: "disable", + DbTLSCACert: "", + DbMaxOpenConnsMultiplier: 8, + DbSqliteJournalMode: "WAL", + DbSqliteSynchronous: "NORMAL", + DbSqliteCacheSize: 8 * bytesize.MiB, + DbSqliteBusyTimeout: time.Minute * 5, WebTemplateBaseDir: "./web/template/", WebAssetBaseDir: "./web/assets/", |