system-config/playbooks/roles/gitea
Clark Boylan dbe477b205 Increase gitea db connection limit
By default our mariadb database for gitea nodes limits itself to a
maximum of 100 connections. We've seen errors like this:

 ...eb/routing/logger.go:102:func1() [I] router: completed POST /openstack/requirements/git-upload-pack for 127.0.0.1:50562, 500 Internal Server Error in 2.6ms @ context/user.go:17(web.gitHTTPRouters.UserAssignmentWeb)
 ...ules/context/repo.go:467:RepoAssignment() [E] GetUserByName: Error 1040: Too many connections

And after reading gitea's source code this appears to be related to user
lookups to determine if the user making a request against a repo owns
the repo. To do this gitea does a db request to lookup the user from the
request and when this hits the connection limit it bubbles up the mysql
error 1040: Too may connections error.

This problem seems infrequent so we double the limit to 200 which is
both much larger but still a reasonable number.

We also modify the test that checks for gitea server errors without an
http 500 return code to avoid it matching this change improperly. This
was happening because the commit message ends up in the rendered pages
for system-config in the test gitea.

Change-Id: If8c72ab277e88ae09a44a64a1571f94e43df23f8
2024-02-05 10:40:03 -08:00
..
defaults letsencrypt: selfsigned testing certs - use common CA, setup SAN 2022-07-07 10:02:46 +10:00
files Increase gitea db connection limit 2024-02-05 10:40:03 -08:00
handlers Set MaxConnectionsPerChild 8192 for Gitea backends 2021-04-07 15:38:35 +00:00
tasks Increase gitea db connection limit 2024-02-05 10:40:03 -08:00
templates Increase gitea db connection limit 2024-02-05 10:40:03 -08:00
README.rst letsencrypt: selfsigned testing certs - use common CA, setup SAN 2022-07-07 10:02:46 +10:00

Install, configure, and run Gitea.

Role Variables