Why MariaDB discards multiple connections?

Please help.
When connecting from java to mairadb get the error "could not create connection to database server", and that becomes when the number of queries increases. And initially everything is fine. The server is designed so that when you restart it to connect the device, all of them > thousands, and at some stage get this error. Various max_connection, etc. - put up - nothing helps.
If there were problems with the table locks, I would have seen other errors.
Launched two analyzer, all adjusted according to their recommendations.

my my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
connect_timeout = 2
max_connections = 4000
open_files_limit = 16384
innodb_open_files = 16384
max_allowed_packet = 64M
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /var/log/mysql/slow-query.log
log_queries_not_using_indexes
thread_cache_size = 1500
concurrent_insert=ALWAYS
low_priority_updates=1
query_cache_size = 0
query_cache_type = 0
innodb_stats_on_metadata = OFF
innodb_file_per_table=ON
skip-name-resolve


What settings though to watch?
Thanks responded for the help
March 12th 20 at 08:03
0 answer

Find more questions by tags MariaDBCentOSJava