Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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

You can change the number of connections on the fly like this:

MariaDB [(none)]> SET GLOBAL max_connections=1000;

However, you may be in a situation where no connections are available for you to connect. That's why there's...