Reputation: 2715
I would like to know what is the max connection value of mysql max_connections
when i set mysql max connection value like
set global max_connections = 1000000;
and check for the set value it shows me
max_connections = 100000;
but i set it to 1000000
I am excited to know why this happens and how to solve this issue to get 1000000 value.
And I also would like to know that this type of such more connections does any performance issue
Upvotes: 1
Views: 599
Reputation: 142238
max_connections
controls the number of concurrent connections you can have. Most systems don't need more than 100. Each connection takes some RAM, so asking for 1M or even 100K will chew up a lot of memory -- possibly causing the system to crash. Don't set that variable that high.
There are two versions of the VARIABLES
-- one GLOBAL
and one SESSION
.
When mysqld starts, the GLOBAL
one are set from the config file(s) and/or defaults.
When a connection starts, it inherits the GLOBAL
values for its SESSION
values. (I'll stop here since it is not relevant to your question -- but be aware of such if you stumble in some other direction.)
To answer your specific question, see https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_connections -- Note that the max value is only 100K.
Upvotes: 2