sous-chefs / mysql

Development repository for the mysql cookbook
https://supermarket.chef.io/cookbooks/mysql
Apache License 2.0
338 stars 690 forks source link

How increase max_connections #493

Closed tiago-cruz-movile closed 7 years ago

tiago-cruz-movile commented 7 years ago

Cookbook version

version: 6.1.2

Chef-client version

12.5.1

Platform Details

CentOS 7 mysql-community-server-5.5.53-2.el7.x86_64

Scenario:

Change max_connections

Steps to Reproduce:

Use

mysql_config 'default' do
  source 'my.cnf.erb'
  action :create
end

mysql_service 'default' do
  port '3306'
  bind_address '127.0.0.1'
  data_dir '/ir/mysql'
  error_log '/ir-logs/mysql'
  initial_root_password mysql["passwd"]
  socket '/var/lib/mysql/mysql.sock'
  action [:create, :start]
end
$ grep conn templates/default/my.cnf.erb 
max_connections = 1000

Expected Result:

max_connections = 1000

Actual Result:

mysql> show variables where Variable_name like 'max_conn%';
+--------------------------+-----------------+
| Variable_name            | Value           |
+--------------------------+-----------------+
| max_connect_errors       | 10              |
| max_connections          | 214             |
+--------------------------+-----------------+
7 rows in set (0.00 sec)
[root@zabbix3 ~]# grep conn /etc/mysql-default/my.cnf 
[root@zabbix3 ~]# grep conn /etc/mysql-default/
conf.d/ my.cnf  
[root@zabbix3 ~]# grep conn /etc/mysql-default/conf.d/default.cnf 
max_connections = 1000

Thanks

tiago-cruz-movile commented 7 years ago

Looks like after add open_files_limit = 8192 in my.cnf worked :/

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.