Добрый день!
Каждое начало дня сопровождается вот таким выхлопом в error.log BGInetAccounting - сервера ( его ип 192.168.120.120 ):
Код:
radius 08-25/00:00:15 ERROR [rdsLstnr-p-7-t-10] InetNas - com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
ru.bitel.bgbilling.common.BGException: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
at ru.bitel.bgbilling.modules.inet.accounting.SessionFlushingManager.flush(SessionFlushingManager.java:460)
at ru.bitel.bgbilling.modules.inet.accounting.Accounting.sessionFinish(Accounting.java:1786)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionRuntime.splitSessionImpl(InetConnectionRuntime.java:1188)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionCallRuntime.splitSession(InetConnectionCallRuntime.java:479)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionRuntime.trySplitSession(InetConnectionRuntime.java:994)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionCallRuntime.trySplitSession(InetConnectionCallRuntime.java:453)
at ru.bitel.bgbilling.modules.inet.accounting.Accounting.processRadiusPacket(Accounting.java:1853)
at ru.bitel.bgbilling.modules.inet.radius.InetNas.updateConnection(InetNas.java:644)
at ru.bitel.bgbilling.modules.inet.radius.InetNas.updateConnection(InetNas.java:73)
at ru.bitel.bgbilling.kernel.network.radius.RadiusProcessor.accounting(RadiusProcessor.java:637)
at ru.bitel.bgbilling.kernel.network.radius.RadiusProcessor.accountingRequest(RadiusProcessor.java:563)
at ru.bitel.bgbilling.modules.inet.radius.InetRadiusListenerWorker.accountingRequest(InetRadiusListenerWorker.java:190)
at ru.bitel.bgbilling.modules.inet.radius.InetRadiusListenerWorker.accountingRequest(InetRadiusListenerWorker.java:36)
at ru.bitel.bgbilling.kernel.network.radius.RadiusListenerWorker.processAccountingRequest(RadiusListenerWorker.java:335)
at ru.bitel.bgbilling.kernel.network.radius.RadiusListenerWorker.processPacket(RadiusListenerWorker.java:306)
at ru.bitel.bgbilling.kernel.network.radius.RadiusListenerWorker.runImpl(RadiusListenerWorker.java:155)
at ru.bitel.common.worker.WorkerTask.run(WorkerTask.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
at ru.bitel.common.worker.WorkerThread.run(WorkerThread.java:46)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at ru.bitel.bgbilling.modules.inet.accounting.SessionFlushingManager.merge(SessionFlushingManager.java:929)
at ru.bitel.bgbilling.modules.inet.accounting.SessionFlushingManager.flush(SessionFlushingManager.java:385)
... 20 more
При этом на самом сервере БЖБ ( у него ип 192.168.120.211 ) "show engine innodb status" пишет:
Код:
------------------------
LATEST DETECTED DEADLOCK
------------------------
2017-08-25 00:00:15 0x7f601ed32700
*** (1) TRANSACTION:
TRANSACTION 312224371, ACTIVE 0 sec fetching rows
mysql tables in use 1, locked 1
LOCK WAIT 37 lock struct(s), heap size 3520, 161 row lock(s), undo log entries 145
MySQL thread id 7702, OS thread handle 140050366265088, query id 3103557805 192.168.120.120 bill updating
DELETE FROM inet_session_detail_10 WHERE sessionId=9458549
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 115 page no 237 n bits 432 index PRIMARY of table `bgbilling`.`inet_session_detail_10` /* Partition `p5` */ trx id 312224371 lock_mode X waiting
*** (2) TRANSACTION:
TRANSACTION 312224372, ACTIVE 0 sec starting index read, thread declared inside InnoDB 5000
mysql tables in use 1, locked 1
36 lock struct(s), heap size 3520, 100 row lock(s), undo log entries 84
MySQL thread id 5987, OS thread handle 140050810742528, query id 3103557809 192.168.120.120 bill updating
DELETE FROM inet_session_detail_10 WHERE sessionId=9458557
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 115 page no 237 n bits 432 index PRIMARY of table `bgbilling`.`inet_session_detail_10` /* Partition `p5` */ trx id 312224372 lock mode S
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 115 page no 237 n bits 432 index PRIMARY of table `bgbilling`.`inet_session_detail_10` /* Partition `p5` */ trx id 312224372 lock_mode X waiting
*** WE ROLL BACK TRANSACTION (2)
------------
Может это имеет какое-нибудь значение, но эту таблицу одновременно в начале каждых суток пытаются апдейтить 3 BGInetAccounting-сервера . Один считает радиус, два остальных - нетфлоу и на этих двух ошибки в error.log в это время одинаковы:
Код:
collector 08-25/00:00:07 ERROR [flow-p-7-t-6] FlowAgentInterface - com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
ru.bitel.bgbilling.common.BGException: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
at ru.bitel.bgbilling.modules.inet.accounting.SessionFlushingManager.flush(SessionFlushingManager.java:460)
at ru.bitel.bgbilling.modules.inet.accounting.Accounting.sessionFinish(Accounting.java:1786)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionRuntime.splitSessionImpl(InetConnectionRuntime.java:1188)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionRuntime.splitSession(InetConnectionRuntime.java:1095)
at ru.bitel.bgbilling.modules.inet.accounting.InetConnectionRuntime.trySplitSession(InetConnectionRuntime.java:994)
at ru.bitel.bgbilling.modules.inet.accounting.FlowAgentInterface.processFlow(FlowAgentInterface.java:212)
at ru.bitel.bgbilling.modules.inet.collector.FlowListenerWorker.processPacketImpl0(FlowListenerWorker.java:287)
at ru.bitel.bgbilling.modules.inet.collector.FlowListenerWorker.processPacketImpl(FlowListenerWorker.java:178)
at ru.bitel.bgbilling.modules.inet.collector.FlowListenerWorkerNetflow.processPacket(FlowListenerWorkerNetflow.java:29)
at ru.bitel.bgbilling.modules.inet.collector.FlowListenerWorker.runImpl(FlowListenerWorker.java:60)
at ru.bitel.common.worker.WorkerTask.run(WorkerTask.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
at ru.bitel.common.worker.WorkerThread.run(WorkerThread.java:46)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at ru.bitel.bgbilling.modules.inet.accounting.SessionFlushingManager.merge(SessionFlushingManager.java:929)
at ru.bitel.bgbilling.modules.inet.accounting.SessionFlushingManager.flush(SessionFlushingManager.java:385)
... 14 more
Как тут быть ?
==========================
Информация о версии:
Клиент: вер. 6.2.862 / 30.05.2017 03:57:55
os: Linux; java: Java HotSpot(TM) 64-Bit Server VM, v.1.8.0_131
Сервер: вер. 6.2.1184 / 30.05.2017 04:17:11
os: Linux; java: Java HotSpot(TM) 64-Bit Server VM, v.1.8.0_131
bill: вер. 6.2.103 / 12.05.2017 18:50:32
card: вер. 6.2.43 / 16.03.2017 23:47:47
dialup: вер. 6.2.316 / 12.05.2017 18:52:28
drweb: вер. 6.2.71 / 09.03.2016 11:43:11
email: вер. 6.2.177 / 14.12.2016 14:27:42
inet: вер. 6.2.720 / 30.05.2017 03:55:47
ipn: вер. 6.2.264 / 09.01.2017 16:41:56
mps: вер. 6.2.225 / 17.05.2017 18:35:37
npay: вер. 6.2.200 / 30.05.2017 04:17:18
payonline: вер. 6.2.65 / 01.06.2017 15:55:49
rentsoft: вер. 6.2.63 / 04.10.2016 19:16:26
reports: вер. 6.2.217 / 02.05.2017 12:37:22
ru.bitel.bgbilling.plugins.crm: вер. 6.2.195 / 04.10.2016 19:16:05
ru.bitel.bgbilling.plugins.dispatch: вер. 6.2.97 / 12.05.2017 18:50:40
ru.bitel.bgbilling.plugins.documents: вер. 6.2.176 / 14.12.2016 14:33:16
ru.bitel.bgbilling.plugins.helpdesk: вер. 6.2.182 / 04.10.2016 19:16:06
trayinfo: вер. 6.2.171 / 10.03.2017 18:11:41
voiceip: вер. 6.2.192 / 12.05.2017 18:50:31
wm: вер. 6.2.189 / 04.10.2016 19:16:46
yamoney: вер. 6.2.58 / 04.10.2016 19:16:49
Окружение:
Клиент:
os: Linux amd64, 4.10.0-30-generic
java: Java HotSpot(TM) 64-Bit Server VM, v.1.8.0_131
jre home: /home/oleg/BGBillingClient_6.2/jdk1.8.0_131/jre
default tz: 09.08.2017 13:42 MSK +0300 (Europe/Moscow)
user tz: 09.08.2017 13:42 MSK +0300 (Europe/Moscow)
locale: ru_RU
Сервер:
os: Linux amd64, 4.4.0-78-generic
java: Java HotSpot(TM) 64-Bit Server VM, v.1.8.0_131
jre home: /opt/java/jdk1.8.0_131/jre
default tz: 09.08.2017 13:42 MSK +0300 (Europe/Moscow)
db time: master: 09.08.2017 13:42 MSK
db charset: connection: utf8(utf8_unicode_ci), database: utf8(utf8_unicode_ci)
locale: en_US
uptime: Started: 11.06.2017 08:18:27 Uptime: 59 d 05:24:01