# Maximum number of database connections exceeded

**URL:** <https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [October 8, 2024, 12:50pm UTC](https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747 "2024-10-08T12:50:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim\_glueck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tim_glueck/32/12926_2.png) [@tim\_glueck](https://forum.mautic.org/u/tim_glueck)\
**Post date:** [October 8, 2024, 12:50pm UTC](https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747/1 "2024-10-08T12:50:45Z")

</div>

**Your software**  
My Mautic version is: 5.1  
My PHP version is: 8.1  
My Database type and version is: Mysql

**Your problem**  
My problem is:  
I have configured and installed Mautic without issues and it runs approx. for 10 days. After that the site goes offline with the message: “The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.”

The crownjobs throw the message:  
User webXXX\_Y already has more than ‘max\_user\_connections’ active connections.

Checking with the administration support of my server mautic is leaving the database connections open and the number of connections permitted by my hoster is a maximum of 10 connections at a time. Closing them the will get reopend right away.  
Deactivating the crone jobs doesn’t change the situation that the connections will be reopened.  
Database is only used from Mautic and can only be accessed locally.

Cronjobs running:  
php /home/www/Mautic/bin/console mautic:segments:update  
php /home/www/Mautic/bin/console mautic:campaigns:update   
php /home/www/Mautic/bin/console mautic:campaigns:trigger  
php /home/www/Mautic/bin/console mautic:iplookup:download  
php /home/www/Mautic/bin/console messenger:consume email   
php /home/www/Mautic/bin/console mautic:email:fetch  
php /home/www/Mautic/bin/console mautic:maintenance:cleanup --days-old=365 --dry-run --gdpr  
php /home/www/Mautic/bin/console mautic:donotsell:download  
php /home/www/Mautic/bin/console mautic:max-mind:purge  
php /home/www/Mautic/bin/console mautic:import

---

<div class="post-metadata">

**Author:** ![tim\_glueck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tim_glueck/32/12926_2.png) [@tim\_glueck](https://forum.mautic.org/u/tim_glueck)\
**Post date:** [October 8, 2024, 12:57pm UTC](https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747/2 "2024-10-08T12:57:41Z")

</div>

Database: 10.5.26-MariaDB ; mysql Ver 15.1

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [October 8, 2024, 3:35pm UTC](https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747/3 "2024-10-08T15:35:30Z")

</div>

Have you checked the MySQL active connections?

You may have reached the maximum/limit of your SQL server.

If that’s the case, you’ll need to modify your my.cnf configuration file to allow more connections.

---

<div class="post-metadata">

**Author:** ![tim\_glueck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tim_glueck/32/12926_2.png) [@tim\_glueck](https://forum.mautic.org/u/tim_glueck)\
**Post date:** [October 10, 2024, 5:20am UTC](https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747/4 "2024-10-10T05:20:32Z")

</div>

Thank you for your reply!

How do mean to check the active connections? As described above there are always 10 connections open that will instantly get reopend when closed by server administration.

The SQL Server it self is running without issues, as the other services using the server are perfoming without issues. Each of the services has its own user and the user is limited to 10 open connections at once, which can’t be changed.

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [October 16, 2024, 9:38am UTC](https://forum.mautic.org/t/maximum-number-of-database-connections-exceeded/33747/5 "2024-10-16T09:38:57Z")

</div>

You have answered your question… Can’t be changed

Your solution would be to ditch that MySQL service provider and your own self-hosted DB server.
