Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mysql has a setting called wait_timeout, which defines the duration after which a connection may not be used anymore. Gotify doesn't apply this, and expects the connection to work without timeout. The fix is to set SetConnMaxLifetime, this however, isn't the exact counterpart for wait_timeout on mysql. wait_timeout is relative to the last use of the connection. The go setting uses the creation of the connection as base. Example error output: ``` [mysql] 2020/05/31 17:53:02 packets.go:36: unexpected EOF [GIN] 2020/05/31 - 17:53:02 | 500 | 247.062µs | 10.2.2.1 | GET "/application" Error #1: an error occured while authenticating user (/proj/database/client.go:24) [2020-05-31 17:53:02] invalid connection ```
- Loading branch information