Доброго времени суток форумчане, прошу помощи советом тех, кто разбирается в серверостроении или сталкивался с подобными проблемами.
Имеется проблема в конфиге чего то... (пока не понял чего) На входе сборка hf Alex l2j-dev (к разработчику обращался, помочь не смог, у других клиентов все в порядке) с драйвером базы данных HikariCP
- Суть проблемы
все обращения к базе приводят к фризу персонажа, например при включеном автолуте и убийстве моба, персонажа фризит на долю секунды, при продаже вещей из инвентаря происходит фриз на 1-2 секунды, есть предположение, что при повышении кол-ва обращений, т.е. больше людей, задержки будут так же рости пропорционально
- Конфиг драйвера
# This is the name of the DataSource class provided by the JDBC driver.
# Consult the documentation for your specific JDBC driver to get this class name.
dataSourceClassName = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
# This property controls the maximum number of milliseconds that a client (that's you) will wait for a connection from the poo$
# 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 +1$
# 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
- Конфиг базы mysql (mariaDB InnoDB utf8_general_ci )
key_buffer_size = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 16
interactive_timeout = 60
wait_timeout = 600
max_connections = 2000
query_cache_type = 0
query_cache_limit = 1M
query_cache_size = 64M
tmp_table_size = 16M
max_heap_table_size = 16M
table_open_cache = 1495
innodb_buffer_pool_size = 2G
innodb_log_file_size = 16M
- железо и ПО
выделенный сервер ubuntu 18.04 lts
SSD disk (raid)
Model Family: Intel 53x and Pro 2500 Series SSDs
Device Model: INTEL SSDSC2BW240A4
LU WWN Device Id: 5 5cd2e4 0003b33f2
Firmware Version: DCV2
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
- логи
в логах базы error.log нет ошибок, есть только строки сброшеных соединений по таймауту
2018-12-07T14:31:37.350611Z 351807 [Note] Aborted connection 351807 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:31:37.357771Z 351806 [Note] Aborted connection 351806 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.338604Z 351843 [Note] Aborted connection 351843 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.344722Z 351840 [Note] Aborted connection 351840 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.350708Z 351842 [Note] Aborted connection 351842 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.350913Z 351841 [Note] Aborted connection 351841 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
Имеется проблема в конфиге чего то... (пока не понял чего) На входе сборка hf Alex l2j-dev (к разработчику обращался, помочь не смог, у других клиентов все в порядке) с драйвером базы данных HikariCP
- Суть проблемы
все обращения к базе приводят к фризу персонажа, например при включеном автолуте и убийстве моба, персонажа фризит на долю секунды, при продаже вещей из инвентаря происходит фриз на 1-2 секунды, есть предположение, что при повышении кол-ва обращений, т.е. больше людей, задержки будут так же рости пропорционально
- Конфиг драйвера
# This is the name of the DataSource class provided by the JDBC driver.
# Consult the documentation for your specific JDBC driver to get this class name.
dataSourceClassName = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
# This property controls the maximum number of milliseconds that a client (that's you) will wait for a connection from the poo$
# 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 +1$
# 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
- Конфиг базы mysql (mariaDB InnoDB utf8_general_ci )
key_buffer_size = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 16
interactive_timeout = 60
wait_timeout = 600
max_connections = 2000
query_cache_type = 0
query_cache_limit = 1M
query_cache_size = 64M
tmp_table_size = 16M
max_heap_table_size = 16M
table_open_cache = 1495
innodb_buffer_pool_size = 2G
innodb_log_file_size = 16M
- железо и ПО
выделенный сервер ubuntu 18.04 lts
SSD disk (raid)
Model Family: Intel 53x and Pro 2500 Series SSDs
Device Model: INTEL SSDSC2BW240A4
LU WWN Device Id: 5 5cd2e4 0003b33f2
Firmware Version: DCV2
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
- логи
в логах базы error.log нет ошибок, есть только строки сброшеных соединений по таймауту
2018-12-07T14:31:37.350611Z 351807 [Note] Aborted connection 351807 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:31:37.357771Z 351806 [Note] Aborted connection 351806 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.338604Z 351843 [Note] Aborted connection 351843 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.344722Z 351840 [Note] Aborted connection 351840 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.350708Z 351842 [Note] Aborted connection 351842 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)
2018-12-07T14:32:07.350913Z 351841 [Note] Aborted connection 351841 to db: 'l2dev' user: 'l2dev' host: 'localhost' (Got timeout reading communication packets)