Z
Z
Zzzers2020-07-07 15:41:21
MySQL
Zzzers, 2020-07-07 15:41:21

Why does max_connections change itself?

Good afternoon. The centos 7 system is installed django + uwsgi + mariadb + nginx
The essence of the issue is this if I set max_connections = 1000 in the my.cnf file and save. After restarting mysql, if I look in the database, I see this:

MariaDB [(none)]> show variables like 'max_connections';
+-----------------+--------+
| Variable_name   | Value  |
+-----------------+--------+
| max_connections | 100000 |
+-----------------+--------+

Tried to do this through mariadb itself:
MariaDB [(none)]> set global max_connections := 1000;

The /etc/my.cnf config looks like this:

# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]

[mysqld]
max_connections = 1000
query_cache_size = 0
query_cache_type = 0
#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d

The bottom line is that after changing the parameter, it keeps for some time, but literally after an hour + - it again becomes like this:
| Variable_name   | Value  |
+-----------------+--------+
| max_connections | 100000 |
+-----------------+--------+

Tell me what changes it? Maybe I'm doing something wrong. Parameter 1000 is exactly what you need.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zzzers, 2020-07-07
@Zzzers

Decided like this:
go to /etc/my.cnf.d/server.cnf and write your max_connections = 1000 in the [mariadb] item
, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question