Database is locked after UPS failure

Hi. My UPS died and the servers went down. Now i have fixed the UPS and the server i up and running but i my node is offline and the log says:

ERROR orders archiving orders {“error”: “ordersdb error: database is locked”, “errorVerbose”: “ordersdb error: database is locked\n\tstorj.io/storj/storagenode/storagenodedb.(*ordersDB).archiveOne:238\n\tstorj.io/storj/storagenode/storagenodedb.(*ordersDB).Archive:202\n\tstorj.io/storj/storagenode/orders.(*Service).handleBatches.func2:213\n\tstorj.io/storj/storagenode/orders.(*Service).handleBatches:237\n\tstorj.io/storj/storagenode/orders.(*Service).sendOrders.func1:164\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”}

OS: Unraid
What to do?

Is their other messages in the log file about getting pieces?
How long has it been since you restarted the node?

After a bad shutdown it can take a few mins to an hour or so for the database to sort itself out. It’s saying it’s “locked” because it was being used when the power failed and didn’t close things correctly. It will take time for the old lock to timeout and let the node operate correctly.

This is in the log since i started it:

2019-12-07T20:38:51.247Z e[34mINFOe[0m orders.12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S sending {“count”: 380}
2019-12-07T20:38:51.247Z e[34mINFOe[0m orders.118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW sending {“count”: 484}
2019-12-07T20:38:51.248Z e[34mINFOe[0m orders.121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6 sending {“count”: 37}
2019-12-07T20:38:51.248Z e[34mINFOe[0m orders.12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs sending {“count”: 4}
2019-12-07T20:38:51.522Z e[34mINFOe[0m orders.12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs finished
2019-12-07T20:38:52.508Z e[34mINFOe[0m piecestore:monitor Remaining Bandwidth {“bytes”: 999609325258240}
2019-12-07T20:38:52.566Z e[34mINFOe[0m orders.118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW finished
2019-12-07T20:38:52.686Z e[34mINFOe[0m orders.121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6 finished
2019-12-07T20:38:53.916Z e[34mINFOe[0m orders.12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S finished
2019-12-07T20:39:03.937Z e[31mERRORe[0m orders archiving orders {“error”: “ordersdb error: database is locked”, “errorVerbose”: “ordersdb error: database is locked\n\tstorj.io/storj/storagenode/storagenodedb.(*ordersDB).archiveOne:238\n\tstorj.io/storj/storagenode/storagenodedb.(*ordersDB).Archive:202\n\tstorj.io/storj/storagenode/orders.(*Service).handleBatches.func2:213\n\tstorj.io/storj/storagenode/orders.(*Service).handleBatches:237\n\tstorj.io/storj/storagenode/orders.(*Service).sendOrders.func1:164\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”}

2019-12-07T20:53:50.937Z e[34mINFOe[0m version running on version v0.26.2

28 min since i started the node.

Most of the time database locked is cause when you remove the container and re add it. Most of the time it goes away.