Merge "Increase gitea db connection limit"

This commit is contained in:
Zuul 2024-02-05 23:21:42 +00:00 committed by Gerrit Code Review
commit af14ca1aba
4 changed files with 11 additions and 1 deletions
playbooks/roles/gitea
testinfra

@ -0,0 +1,2 @@
[mysqld]
max_connections=200

@ -24,6 +24,13 @@
template: template:
src: app.ini.j2 src: app.ini.j2
dest: /var/gitea/conf/app.ini dest: /var/gitea/conf/app.ini
- name: Write mariadb conn limit config file
copy:
src: 99-max_conn_my.cnf
dest: /var/gitea/conf/99-max_conn_my.cnf
owner: root
group: root
mode: 0644
- name: Install distro packages - name: Install distro packages
package: package:
name: name:

@ -14,6 +14,7 @@ services:
MYSQL_PASSWORD: "{{ gitea_db_password }}" MYSQL_PASSWORD: "{{ gitea_db_password }}"
volumes: volumes:
- /var/gitea/db:/var/lib/mysql - /var/gitea/db:/var/lib/mysql
- /var/gitea/conf/99-max_conn_my.cnf:/etc/mysql/conf.d/99-max_conn_my.cnf:ro
logging: logging:
driver: syslog driver: syslog
options: options:

@ -130,7 +130,7 @@ def test_no_500_template_content(host):
'--resolve gitea99.opendev.org:3081:127.0.0.1 ' '--resolve gitea99.opendev.org:3081:127.0.0.1 '
'https://gitea99.opendev.org:3081' + path) 'https://gitea99.opendev.org:3081' + path)
assert 'status-page-500' not in cmd.stdout assert 'status-page-500' not in cmd.stdout
assert 'Internal Server Error' not in cmd.stdout assert '<title>Internal Server Error' not in cmd.stdout
def test_gitea_screenshots(host): def test_gitea_screenshots(host):