OriginTrail / ot-node

OriginTrail Decentralized Knowledge Graph network node
https://origintrail.io
Apache License 2.0
204 stars 74 forks source link

infinite boot loop due to MySQL timeout #3312

Open botnumberseven opened 1 month ago

botnumberseven commented 1 month ago

I have a node which is in infinite boot loop due to MySQL timeout. image

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;

Mihajlo-Pavlovic commented 3 weeks ago

Thanks for reporting this will be handled in same way as #3313