Gitea suddenly consumes all available memory

Since some days, my gitea instance from time to time suddenly starts to consume all available memory (several GiBs of RAM). This issue appeared after upgrading from 1.9.1 to 1.9.2, but this could also be a coincidence.
One note about the log below: I have not set up any mirror repos.

Sep 11 22:24:14  gitea[9559]: [mysql] 2019/09/11 22:24:14 packets.go:36: unexpected EOF
Sep 11 22:26:08  gitea[9559]: [mysql] 2019/09/11 22:26:08 packets.go:36: unexpected EOF
Sep 11 22:26:08  gitea[9559]: 2019/09/11 22:24:14 ...ules/context/repo.go:346:func1() [E] GetRepositoryByName: invalid connection
Sep 11 22:26:08  gitea[9559]: 2019/09/11 22:26:08 ...ules/context/repo.go:346:func1() [E] GetRepositoryByName: bad connection
Sep 11 22:26:52  gitea[9559]: 2019/09/11 22:26:52 ...ules/context/repo.go:321:func1() [E] GetUserByName: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:26:58  gitea[9559]: 2019/09/11 22:26:58 ...ules/context/repo.go:321:func1() [E] GetUserByName: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:35:33  gitea[9559]: 2019/09/11 22:35:33 ...ules/context/repo.go:321:func1() [E] GetUserByName: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:35:33  gitea[9559]: 2019/09/11 22:35:33 ...odels/repo_mirror.go:338:MirrorUpdate() [E] MirrorUpdate: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:35:33  gitea[9559]: 2019/09/11 22:35:33 ...ules/context/repo.go:321:func1() [E] GetUserByName: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:35:33  gitea[9559]: 2019/09/11 22:35:33 ...ules/context/repo.go:321:func1() [E] GetUserByName: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:35:33  gitea[9559]: 2019/09/11 22:35:33 ...ules/context/repo.go:321:func1() [E] GetUserByName: dial tcp 127.0.0.1:3306: connect: connection refused
Sep 11 22:45:33  gitea[9559]: 2019/09/11 22:45:33 ...odels/repo_mirror.go:338:MirrorUpdate() [E] MirrorUpdate: dial tcp 127.0.0.1:3306: connect: connection refused

As this data is probably not too helpful, I decided to post here first instead of in a GitHub issue.
Any ideas what’s wrong? If not, how can I ease debugging? So far I set the log level to debug and restricted the maximum memory allocation of the service. I might also try the previous version 1.9.1

I recommend using pprof to see what exactly Gitea is doing. To enable look at the ```
ENABLE_PPROF and PPROF_DATA_PATH settings in app.ini (example: https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample#L233 )