There's a tough request on the queue that makes the script keep a transaction open for more than 3 hours, at which point the master store connection gets killed by one of our watchdog processes.
There's no good reason why there should be a transaction open on the master store in the first place, until the very end where we remove the request and send email. We're particularly hitting the instance in POTMsgSet._conflictsExistingSourceFileFormats here, which still uses cursor().
Instating a SlaveOnlyDatabasePolicy would make cursor() (and other default stores) use the slave store. That should stop the script from opening a transaction on the master until the end.
We could also consider committing between files, rather than between requests. The place for that would be in the TranslationExporter.exportTranslationFiles loop.
There's a tough request on the queue that makes the script keep a transaction open for more than 3 hours, at which point the master store connection gets killed by one of our watchdog processes.
There's no good reason why there should be a transaction open on the master store in the first place, until the very end where we remove the request and send email. We're particularly hitting the instance in POTMsgSet. _conflictsExist ingSourceFileFo rmats here, which still uses cursor().
Instating a SlaveOnlyDataba sePolicy would make cursor() (and other default stores) use the slave store. That should stop the script from opening a transaction on the master until the end.
We could also consider committing between files, rather than between requests. The place for that would be in the TranslationExpo rter.exportTran slationFiles loop.