Commit graph

5 commits

Author SHA1 Message Date
Neil Alexander ded9cc2f94
Control whether to use go-sqlite3 or modernc.org/sqlite depending on CGO_ENABLED 2022-11-02 12:01:56 +00:00
0x1a8510f2 f58597f574
Fix database is locked errors 2022-10-26 13:06:33 +01:00
Neil Alexander e596d8bb93
Moar fix 2022-10-26 12:58:35 +01:00
Neil Alexander ebd137cf6b
Check PostgreSQL connection count (#2760)
This PR queries PostgreSQL for the `max_connections` and
`superuser_reserved_connections` settings and then ensures that
Dendrite's `max_open_conns` doesn't exceed the allowed value.

This is a really common source of configuration problems and can either
result in blocking queries or deadlocks, so it seems reasonable that we
complain as loudly as possible when it happens.
2022-10-05 11:07:17 +01:00
Neil Alexander 4ad5f9c982
Global database connection pool (for monolith mode) (#2411)
* Allow monolith components to share a single database pool

* Don't yell about missing connection strings

* Rename field

* Setup tweaks

* Fix panic

* Improve configuration checks

* Update config

* Fix lint errors

* Update comments
2022-05-03 16:35:06 +01:00