Page MenuHomePhabricator

Wikilabels needs manual reboot when DB connection is broken
Open, NormalPublic

Description

This might be avoidable in the future, with some auto-reconnect logic at the database interface.

Event Timeline

awight created this task.Nov 15 2018, 5:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 15 2018, 5:00 PM

The solution is probably to catch OperationalError and DatabaseError around cursor.execute calls. We would have to reconnect using a backoff, and refresh all connection pool threads if the server is unresponsive. Make sure we're using timeouts to avoid hanging.

Ladsgroup triaged this task as Normal priority.Nov 28 2018, 6:42 AM
Ladsgroup moved this task from Untriaged to Maintenance/cleanup on the Scoring-platform-team board.
Ladsgroup raised the priority of this task from Normal to Needs Triage.
Ladsgroup triaged this task as Normal priority.Dec 5 2018, 2:30 PM
Ladsgroup added a subscriber: Ladsgroup.EditedJan 28 2019, 12:38 PM

I took a look at it. All of the classes in database folder need rewrite. (Factor out the transaction bit, abstract query building probably by using pypika). This is a way bigger thing than I thought.

Ladsgroup claimed this task.Mar 2 2019, 5:27 PM

I will do it gradually.

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptMar 2 2019, 5:27 PM
Halfak added a subscriber: Halfak.EditedMar 20 2019, 5:51 PM

What does removing the explicit transaction or using query building have to do with this task? I'm confused.

awight removed a subscriber: awight.Mar 21 2019, 4:04 PM