Maximum connections

By default, MariaDB is configured for 150 connections plus one for root access if not already used (so 151 connections). In most cases, 150 is really enough, but it might not be in your case if you've got a lot of connection errors on your application.

The recommended action to change this value is the persistent way and then restarting MariaDB (of course, this will kill all the current persistent connections). So, change this value in the configuration file:

[mysqld]
max_connections = 200

After rebooting MariaDB, you should be able to see the new value:

MariaDB [(none)]> select @@global.max_connections;
+--------------------------+
| @@global.max_connections |
+--------------------------+
|                      200 |
+--------------------------+ ...

Get MariaDB High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.