Am running Moodle 4.2+ and mariadb 10.6.15 but of late am frequently receiving error
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
Database: Too many connections after a few hours of usage
i have increased the max_connection to 1000 but still getting the same error