We are running a Survey campaign and when we turn the dial level up we get a message
MySQL connect ERROR: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
I have been changing stuff in my.cnf googling like crazy but can't seem to find what the setting is here.
We are not using anywhere near the 32gb RAM in the database server.
Heres what I have noticed. the error messages starts popping up when I am around 485 threads connected.
I see this number with this in the command line echo 'SHOW STATUS;' | mysql | grep -i threads
Delayed_insert_threads 0
Slow_launch_threads 0
Threadpool_idle_threads 0
Threadpool_threads 0
Threads_cached 1
Threads_connected 484
Threads_created 1612
Threads_running 1
and cat /proc/sys/kernel/threads-max gives me 257173 if that means anything here.
Heres what we have tried.
Reinstalling, raising mysql max connections as high as 8000, lowering mysql max connections as low as 512 Increasing ulimit
cat /proc/sys/kernel/threads-max is 257173
We have changed various my.cnf settings. so much so that I am not even sure what we did anymore.
Heres what we are currently at
datadir = /srv/mysql/data
server-id = 1
slave-skip-errors = 1032,1690,1062
slave_parallel_threads=2
slave-parallel-mode=optimistic
port = 3306
socket = /var/run/mysql/mysql.sock
sql_mode=NO_ENGINE_SUBSTITUTION
skip-external-locking
skip-name-resolve
connect_timeout=60
long_query_time=3
slow-query-log=1
slow-query-log-file=/var/lib/mysql/mysqld-slow.log
log-slow-verbosity=query_plan,explain
max_connections=512
key_buffer_size = 3G
max_allowed_packet = 16M
table_definition_cache=2048
table_open_cache = 3000
sort_buffer_size = 4M
net_buffer_length = 8K
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 128M
query_cache_size=32M
query_cache_type=1
thread_concurrency=16
default-storage-engine=MyISAM
expire_logs_days = 3
concurrent_insert = 2
myisam_repair_threads = 4
myisam_recover_options=DEFAULT
tmpdir = /tmp/
thread_cache_size=100
join_buffer_size=1M
myisam_use_mmap=1
open_files_limit=245760
max_heap_table_size=256M
tmp_table_size=16M
key_cache_segments=64
I assume it has to be some setting I need to adjust to let mysql use more resources or use more ram or something. Has anyone ran across this?
Dell R610
32gb ram, Raid 1 SSD
VERSION: 2.14-669a
BUILD: 180411-1647
SVN Version: 2966
DB Schema Version: 1541
Installed using vicibox 8
Asterisk 11.25.3-vici