Может кто сталкивался(MariaBD)

Flylink

Прославленный
Местный
Старожил I степени
Сообщения
633
Розыгрыши
0
Репутация
252
Реакции
189
Баллы
1 478
Хроники
  1. Chaotic Throne: High Five
Сборка
l2j-dev
12:31:40 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@66036951 (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
12:32:08 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@6070abab (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
Всинет серв, при этом второй сервак, на этой же машине, прекрасно себе работает, может через какое то время отвиснуть.(часа через 2-3)
 

Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
12:31:40 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@66036951 (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
12:32:08 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@6070abab (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
Всинет серв, при этом второй сервак, на этой же машине, прекрасно себе работает, может через какое то время отвиснуть.(часа через 2-3)
копай конфиг на тему maxLifetime и таймаута. честно не помню как там у маши) Загугли.
 
копай конфиг на тему maxLifetime и таймаута. честно не помню как там у маши) Загугли.
# This property controls the maximum lifetime of a connection in the pool.
# When a connection reaches this timeout, even if recently used, it will be retired from the pool.
# An in-use connection will never be retired, only when it is idle will it be removed.
# We strongly recommend setting this value, and using something reasonable like 30 minutes or 1 hour.
# A value of 0 indicates no maximum lifetime (infinite lifetime), subject of course to the idleTimeout setting.
# Default: 1800000 (30 minutes)
maxLifetime = 1800000

# This property controls the maximum number of milliseconds that a client (that's you) will wait for a connection from the pool.
# If this time is exceeded without a connection becoming available, an SQLException will be thrown.
connectionTimeout = 30000

# This property controls the maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the pool.
# Whether a connection is retired as idle or not is subject to a maximum variation of +30 seconds, and average variation of +15 seconds.
# A connection will never be retired as idle before this timeout.
# A value of 0 means that idle connections are never removed from the pool.
# Default: 600000 (10 minutes)
idleTimeout = 600000

# This property controls the amount of time that a connection can be out of the pool before a message is logged indicating
# a possible connection leak. A value of 0 means leak detection is disabled.
# While the default is 0, and other connection pool implementations state that leak detection is "not for production"
# as it imposes a high overhead, at least in the case of HikariCP the imposed overhead is only 5?s (microseconds)
# split between getConnection() and close(). Maybe other pools are doing it wrong,
# but feel free to use leak detection under HikariCP in production environments if you wish.
leakDetectionThreshold = 0

# This property controls the maximum lifetime of a connection in the pool.
# When a connection reaches this timeout, even if recently used, it will be retired from the pool.
# An in-use connection will never be retired, only when it is idle will it be removed.
# We strongly recommend setting this value, and using something reasonable like 30 minutes or 1 hour.
# A value of 0 indicates no maximum lifetime (infinite lifetime), subject of course to the idleTimeout setting.
# Default: 1800000 (30 minutes)
maxLifetime = 1800000

# This property controls the maximum size that the pool is allowed to reach, including both idle and in-use connections.
# Basically this value will determine the maximum number of actual connections to the database backend.
# A reasonable value for this is best determined by your execution environment.
# When the pool reaches this size, and no idle connections are available,
# calls to getConnection() will block for up to connectionTimeout milliseconds before timing out.
maximumPoolSize = 2500
 
12:31:40 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@66036951 (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
12:32:08 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@6070abab (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
Всинет серв, при этом второй сервак, на этой же машине, прекрасно себе работает, может через какое то время отвиснуть.(часа через 2-3)
Через идею запускаешь?
 
нарыл, но хз, попробуй.
 
Хз конечно, но попробуй прописать драйвер марии, и заменить драйвер мускула на марию в либках.
 
Значение maxLifetime(в миллисекундах) клиента должно быть меньше значения wait_timeout(в секундах) твоего MySQL. Поэтому клиент всегда будет разорвать соединение до того, как обратится к бд
 
Значение maxLifetime(в миллисекундах) клиента должно быть меньше значения wait_timeout(в секундах) твоего MySQL. Поэтому клиент всегда будет разорвать соединение до того, как обратится к бд

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]

#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
skip-name-resolve
skip-ssl
myisam_use_mmap

sql_mode="NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER"


# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0

#
# * Fine Tuning
#
key_buffer_size = 32M
max_allowed_packet = 16M
thread_stack = 512K
thread_cache_size = 128
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam_recover_options = BACKUP
max_connections = 3000

tmp_table_size = 256M
max_heap_table_size = 256M

table_definition_cache = 1024
table_open_cache = 2048

sort_buffer_size = 4M
read_buffer_size = 1536K
read_rnd_buffer_size = 2M
join_buffer_size = 2M
join_buffer_space_limit = 2M

open_files_limit = 8192

#
# * Query Cache Configuration
#
query_cache_type = 1
query_cache_limit = 16M
query_cache_size = 128M
query_cache_wlock_invalidate

#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Enable the slow query log to see queries with especially long duration
#slow_query_log_file = /var/log/mysql/mariadb-slow.log
#long_query_time = 10
#log_slow_rate_limit = 1000
#log_slow_verbosity = query_plan
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 1
max_binlog_size = 4M
#binlog_do_db = include_database_name
#binlog_ignore_db = exclude_database_name

#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!

innodb_file_per_table = 1

innodb_buffer_pool_instances = 1
innodb_buffer_pool_size = 512M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT

innodb_log_buffer_size = 16M
innodb_log_file_size = 64M


#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates you can use for example the GUI tool "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
#
# Accept only connections using the latest and most secure TLS protocol version.
# ..when MariaDB is compiled with OpenSSL:
# ssl-cipher=TLSv1.2
# ..when MariaDB is compiled with YaSSL (default in Debian):
# ssl=on

#
# * Character sets
#
# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
# utf8 4-byte character set. See also client.cnf
#
init_connect = 'SET collation_connection = utf8_general_ci'
character-set-server = utf8
collation-server = utf8_general_ci

#
# * Unix socket authentication plugin is built-in since 10.0.22-6
#
# Needed so the root database user can authenticate without a password but
# only when running as the unix root user.
#
# Also available for other users if required.
# See

# this is only for embedded server
[embedded]

# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.1 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]

Только у меня нет такого конфига, в mysql) или его можно прописать?
 
Выполни sql запрос
SQL:
2
set global wait_timeout = укажи нужный таймаут точку с запятой в конце оставь;
set global interactive_timeout = укажи нужный таймаут точку с запятой в конце оставь;

Ну и не забудь указать в файле, иначе значения сбросятся /etc/mysql/my.cnf, в блоке mysqld:

[mysqld]
wait_timeout = твоё значение
interactive_timeout = твоё значение


Посмотреть текущее значение можно подключившись к mysql и выполнить следующие:

mysql -u USER -p
show variables like "wait_timeout";
show variables like "interactive_timeout";
quit;
 
Последнее редактирование:
Значение maxLifetime(в миллисекундах) клиента должно быть меньше значения wait_timeout(в секундах) твоего MySQL. Поэтому клиент всегда будет разорвать соединение до того, как обратится к бд
28800 значение wait_timeout в секундах
1800000 maxLifetime в миллисекундах( а в секундах 1800) значение меньше( уменьшил до 26800 миллисекунд)

12:07:47 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@435481ef (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
один хрен вылезают эти ошибки
 
28800 значение wait_timeout в секундах
1800000 maxLifetime в миллисекундах( а в секундах 1800) значение меньше( уменьшил до 26800 миллисекунд)

12:07:47 HikariPool-2 - Failed to validate connection org.mariadb.jdbc.MariaDbConnection@435481ef (Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
один хрен вылезают эти ошибки
Всё куда проще с Алексом решали вчера он не смог подсказать оперативно пришлось самому мучаться просто из настроек марины удалите строки или закомментируйте строки :
#wait_timeout=60
#interactive_timeout=30
#connect_timeout = 5
Database.prop выставите дефолт и грузите сбрку т.к значения между друг другами конфликтуют
 
Всё куда проще с Алексом решали вчера он не смог подсказать оперативно пришлось самому мучаться просто из настроек марины удалите строки или закомментируйте строки :
#wait_timeout=60
#interactive_timeout=30
#connect_timeout = 5
Database.prop выставите дефолт и грузите сбрку т.к значения между друг другами конфликтуют
#connect-timeout=31
#interactive-timeout=28801
#wait-timeout=28801 при комменте этих значений, они начинают брать дефолтные
 
#connect-timeout=31
#interactive-timeout=28801
#wait-timeout=28801 при комменте этих значений, они начинают брать дефолтные
И ? Вам же нужно от ошибки избавиться верно ? остальное контролируется через Database.prop.
 
И ? Вам же нужно от ошибки избавиться верно ? остальное контролируется через Database.prop.
у меня этих значений изначально не было в конфиге mysql и брались дефолт значения с бд

connect-timeout=10
interactive-timeout=28800
wait-timeout=28800
эти значения у меня были по дефолту и с ним у меня вылезает проблема с ошибкой, но это происходит в любой момент работы сервера, не при старте, не при заходе, с дефолтными значениями, проблема остается.
У вас просто изначально стояли слишком низкие значения и проблема вылезала сразу
Так что,вы этим действием лишь отсрочили появление этой ошибки.
 
у меня этих значений изначально не было в конфиге mysql и брались дефолт значения с бд

connect-timeout=10
interactive-timeout=28800
wait-timeout=28800
эти значения у меня были по дефолту и с ним у меня вылезает проблема с ошибкой, но это происходит в любой момент работы сервера, не при старте, не при заходе, с дефолтными значениями, проблема остается.
У вас просто изначально стояли слишком низкие значения и проблема вылезала сразу
Тогда сорян думал у Вас марина установлена .... просто в моем случаи помогло. С майсклом такая же проблема была я не стал мучаться с ним. Попробуйте установить марину и сделать тоже что и я ... (если это не принципиально).
 
Тогда сорян думал у Вас марина установлена .... просто в моем случаи помогло. С майсклом такая же проблема была я не стал мучаться с ним. Попробуйте установить марину и сделать тоже что и я ... (если это не принципиально).
оно помогло лишь убрать появление этой ошибки сразу, но при среднем онлайн в 100+игроков, эта ошибка будет снова у вас вылезать.

connect-timeout=10
interactive-timeout=28800
wait-timeout=28800
так как у вас сейчас значения, стали точно такими же, как и были у меня изначально.
 
В теории если увеличить max_connections наверное таких проблем не будет уже ...
 
В теории если увеличить max_connections наверное таких проблем не будет уже ...
Так же остается, как я понял надо настраивать эти 3 конфига, максимальное количество подключений не играет роли, так как проблема связана не с тем что слишком много подключений, а с тем что подключение закрывается и не дает соединиться с базой данных.
 
Назад
Сверху Снизу