Closed Marigold closed 5 months ago
Just a possible hunch, refactoring this whole function to use knex might do something? I see there's a couple of transaction initiations in it using the old DB code.
That was my hope too, the problem is that it's quite outdated and there's no person with both knex and approval tool knowledge.
I'll tackle it my migration from typeorm -> knex this cooldown
I don't think we're still seeing those - @Marigold please re-open if this is still an issue
When someone uses chart approval tool, admin tends to die on MySQL deadlocks. We turned on slow query log (
ssh owid@owid-live-db 'sudo cat /var/log/mysql/slow-query.log'
) and the output around the downtime is belowIt looks like the approval tool locks the
users
table and admin dies when trying to update it.More details on slack.