patternsqlMinor
Mariadb on Centos 7 not changing max connections based on my.cnf
Viewed 0 times
centoscnfmaxbasedchangingnotconnectionsmariadb
Problem
The following configuration in my.cnf is not being followed. Max_connections go back to 151. please help as i have 16gb of dedicated ram that i would like to use properly.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#symbolic-links=0
#vish start
open_files_limit = 8000
max_connections = 500
#set-variable=max_connections=500
thread_concurrency = 8
#concurrent_insert=2
thread_cache_size=2000
interactive_timeout=180
wait_timeout=180
max_allowed_packet = 32M
key_buffer_size = 3000M
read_buffer_size = 16M
read_rnd_buffer_size = 4M
bulk_insert_buffer_size = 256M
myisam_sort_buffer_size = 16M
myisam_max_sort_file_size = 256M
myisam_repair_threads = 1
#myisam_recover = 4
max_heap_table_size = 2048M
tmp_table_size = 1024M
table_open_cache = 2000
table_cache = 2000
sort_buffer_size = 128M
join_buffer_size = 128M
query_cache_size = 128M
query_cache_limit = 128M
#slow_query_log=1
log-slow-queries
long_query_time=2
#log_queries_not_using_indexes=1
slow_query_log_file = /var/log/mariadb/host_name-slow.log
[mysqldump]
user=root
password=*********
#max_allowed_packet = 1024M
[myisamchk]
key_buffer_size = 2500M
sort_buffer_size = 1024M
read_buffer = 32M
write_buffer = 32M
[innodb]
innodb_buffer_pool_size=3G
innodb_buffer_pool_instance=2
innodb_additional_mem_pool_size=20M
innodb_log_file_size= 512M
innodb_log_buffer_size=16M
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=16
#innodb_read_io_threads=16
#innodb_write_io_threads=16
#innodb_io_capacity=2000
#innodb_lock_wait_timeout=120
innodb_flush_method=O_DIRECT
#vish end
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#!includedir /etc/my.cnf.dSolution
You might find that the limit is not where you think.
I've had trouble with open file limits and that's set by Centos itself.
Please see:
How to permanently raise ulimit 'open files' and MySQL 'open_files_limit'
Some key points from that link:
You can raise the
There are more resources like that around.
I've had trouble with open file limits and that's set by Centos itself.
Please see:
How to permanently raise ulimit 'open files' and MySQL 'open_files_limit'
Some key points from that link:
- The default
ulimiton open files is 1024.
- MySQL sets its
open_files_limitto whatever the system's ulimit is set to.
- MySQL cannot set it's
open_files_limithigher thanulimit.
You can raise the
ulimit temporarily or permanently, globally or for specific users; see the link for details.There are more resources like that around.
Context
StackExchange Database Administrators Q#90351, answer score: 2
Revisions (0)
No revisions yet.