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
This commit is contained in:
Felix Edel 2021-11-22 09:37:43 +01:00 committed by James E. Blair
parent edb4985305
commit 460ffdfcb2
2 changed files with 4 additions and 0 deletions

View File

@ -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

2
tools/mysqld.cnf Normal file
View File

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