ot-node
ot-node copied to clipboard
infinite boot loop due to MySQL timeout
I have a node which is in infinite boot loop due to MySQL timeout.
During the boot node tries to delete some type of commands from commands table:
DELETE FROM commands
WHERE name
= 'otnodeUpdateCommand'
DELETE FROM commands
WHERE name
= 'sendTelemetryCommand'
DELETE FROM commands
WHERE name
= 'shardingTableCheckCommand'
DELETE FROM commands
WHERE name
= 'operationIdCleanerCommand'
DELETE FROM commands
WHERE name
= 'commandsCleanerCommand'
DELETE FROM commands
WHERE name
= 'blockchainEventCleanerCommand'
DELETE FROM commands
WHERE name
= 'dialPeersCommand'
DELETE FROM commands
WHERE name
= 'getCleanerCommand'
DELETE FROM commands
WHERE name
= 'getResponseCleanerCommand'
DELETE FROM commands
WHERE name
= 'publishCleanerCommand'
DELETE FROM commands
WHERE name
= 'publishResponseCleanerCommand'
DELETE FROM commands
WHERE name
= 'updateResponseCleanerCommand'
DELETE FROM commands
WHERE name
= 'updateCleanerCommand'
DELETE FROM commands
WHERE name
= 'startParanetSyncCommands'
And it fails to do so with a timeout. I'd assume that's due to size of the commands table, in case of this node it's ~2M rows.
I've added index for name
field, that allowed for these deletes to be performed quick, and the node could boot up.
ALTER TABLE operationaldb
.commands
ADD INDEX name_field
(name
ASC) VISIBLE;