From 460ffdfcb257c1acc7c64af896cc54caecf5fde5 Mon Sep 17 00:00:00 2001 From: Felix Edel Date: Mon, 22 Nov 2021 09:37:43 +0100 Subject: [PATCH] Increase MySQL connection limit in tests When executing the unit tests with multiple schedulers in parallel a lot of them are failing becasue there are too many open SQL connections. However, executing those tests one after another doesn't end up in the connection limit being exhausted. So this doesn't look like a shutdown problem in Zuul. Having a look at the MySQL server when it's under load during the tests revealed that the default connection limit of 151 on the server side is exhausted very quickly when a lot of tests are running in parallel (each test running with two schedulers). Therefore, this change increases the default MySQL connection limit to 300. We should keep in mind that this connection limit has to go in hand with the number of schedulers used in the unit tests and the number of tests executed in parallel. Maybe on the long term it might make sense to cap the latter parameter somehow in the tox.ini file. The same applies to the ZooKeeper connection limit which is configured in tools/zoo.cfg. Change-Id: Iff76e99ec82edc8e8bc110a22a096bb689d8dd1f --- tools/docker-compose.yaml | 2 ++ tools/mysqld.cnf | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tools/mysqld.cnf diff --git a/tools/docker-compose.yaml b/tools/docker-compose.yaml index e17750bb22..edb5676fd4 100644 --- a/tools/docker-compose.yaml +++ b/tools/docker-compose.yaml @@ -10,6 +10,8 @@ services: - "3306:3306" tmpfs: - /var/lib/mysql + volumes: + - "./mysqld.cnf:/etc/mysql/conf.d/mysqld.cnf:z" postgres: container_name: zuul-test-postgres diff --git a/tools/mysqld.cnf b/tools/mysqld.cnf new file mode 100644 index 0000000000..bf7e462d90 --- /dev/null +++ b/tools/mysqld.cnf @@ -0,0 +1,2 @@ +[mysqld] +max_connections = 300