system-config/playbooks/roles/gitea/templates
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
..
app.ini.j2 Disable gitea's update checker cron job 2024-01-08 10:28:42 -08:00
docker-compose.yaml.j2 Increase gitea db connection limit 2024-02-05 10:40:03 -08:00
gitea.vhost.j2 Update gitea logs for better request tracing 2022-09-30 11:29:58 -07:00