If you’re running Zabbix in Docker, and you see the Database error “Too many connections”, edit your docker-compose.yml as follows:
nano docker-compose.yml
Under the mysql-server section under volumes, add the following volume:
- /zabbix_folder_on_disk/zabbix-mysql-conf:/etc/mysql/conf.d:rw
nano /zabbix_folder_on_disk/zabbix-mysql-conf/10_my_tweaks.cnf
Paste the following:
[mysqld]
max_connections = 5000
Restart the mysql container:
docker restart zabbix-mysql-server-1