Repository: mozilla/pontoon

Issue:
Investigate sync performances for comm-l10n and pickle errors
I've noticed before — while doing Fluent migrations — that sync for TB/SM is particularly slow.

One other thing that I've noticed is frequent pickle errors (search for `_pickle.UnpicklingError: pickle data was truncated`). Example:

```
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488448&selected=1575926708336488448) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488448&selected=1575926708336488448) [2023-03-24 14:17:08,722: ERROR/ForkPoolWorker-6] Task pontoon.sync.tasks.sync_project[[5cdece20-77c4-475b-a7a3-712ea3e3c018](https://my.papertrailapp.com/systems/mozilla-pontoon/events?q=%225cdece20-77c4-475b-a7a3-712ea3e3c018%22&focus=1575926708336488448&selected=1575926708336488448)] raised unexpected: PullFromRepositoryException('** unknown exception encountered, please report by visiting\n** https://mercurial-scm.org/wiki/BugTracker\n** Python 3.9.16 (main, Dec  7 2022, 00:02:49) [GCC 11.3.0]\n** Mercurial Distributed SCM (version 5.2.2)\n** Extensions loaded: \nTraceback (most recent call last):\n  File "/app/.heroku/python/bin/hg", line 36, in <module>\n    dispatch.run()\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 111, in run\n    status = dispatch(req)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 250, in dispatch\n    ret = _runcatch(req) or 0\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 424, in _runcatch\n    return _callcatch(ui, _runcatchfunc)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 433, in _callcatch\n    return scmutil.callcatch(ui, func)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/scmutil.py", line 177, in callcatch\n    return func()\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 414, in _runcatchfunc\n    return _dispatch(req)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 1173, in _dispatch\n    return runcommand(\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 862, in runcommand\n    ret = _runcommand(ui, options, cmd, d)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 1185, in _runcommand\n    return cmdfunc()\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 1171, in <lambda>\n    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/util.py", line 1843, in check\n    return func(*args, **kwargs)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/commands.py", line 1912, in clone\n    r = hg.clone(\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/hg.py", line 983, in clone\n    _update(destrepo, uprev)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/hg.py", line 1030, in update\n    stats = updaterepo(repo, node, False, updatecheck=updatecheck)\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/hg.py", line 1018, in updaterepo\n    return mergemod.update(\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/merge.py", line 2557, in update\n    stats, getfiledata = applyupdates(\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/merge.py", line 1927, in applyupdates\n    for final, res in prog:\n  File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/worker.py", line 243, in _posixworker\n    res = util.pickle.load(key.fileobj)\n_pickle.UnpicklingError: pickle data was truncated\n')
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488449&selected=1575926708336488449) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488449&selected=1575926708336488449) Traceback (most recent call last):
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488450&selected=1575926708336488450) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488450&selected=1575926708336488450)   File "/app/.heroku/python/lib/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488451&selected=1575926708336488451) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488451&selected=1575926708336488451)     R = retval = fun(*args, **kwargs)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488452&selected=1575926708336488452) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488452&selected=1575926708336488452)   File "/app/.heroku/python/lib/python3.9/site-packages/newrelic/hooks/application_celery.py", line 99, in wrapper
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488453&selected=1575926708336488453) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488453&selected=1575926708336488453)     return wrapped(*args, **kwargs)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488454&selected=1575926708336488454) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488454&selected=1575926708336488454)   File "/app/.heroku/python/lib/python3.9/site-packages/celery/app/trace.py", line 734, in __protected_call__
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488455&selected=1575926708336488455) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488455&selected=1575926708336488455)     return self.run(*args, **kwargs)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488456&selected=1575926708336488456) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488456&selected=1575926708336488456)   File "/app/pontoon/sync/core.py", line 68, in wrapped_func
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488457&selected=1575926708336488457) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488457&selected=1575926708336488457)     return func(self, *args, **kwargs)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488458&selected=1575926708336488458) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488458&selected=1575926708336488458)   File "/app/pontoon/sync/tasks.py", line 107, in sync_project
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488459&selected=1575926708336488459) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488459&selected=1575926708336488459)     sync_translations(
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488460&selected=1575926708336488460) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488460&selected=1575926708336488460)   File "/app/pontoon/sync/tasks.py", line 230, in sync_translations
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488461&selected=1575926708336488461) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488461&selected=1575926708336488461)     have_locale_repos_changed, pulled_repo_locales = pull_locale_repo_changes(
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488462&selected=1575926708336488462) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488462&selected=1575926708336488462)   File "/app/pontoon/sync/core.py", line 340, in pull_locale_repo_changes
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488463&selected=1575926708336488463) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488463&selected=1575926708336488463)     pulled_revisions = repo.pull(remaining_locales)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488464&selected=1575926708336488464) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488464&selected=1575926708336488464)   File "/app/pontoon/base/models.py", line 2148, in pull
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488465&selected=1575926708336488465) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488465&selected=1575926708336488465)     update_from_vcs(self.type, self.url, self.checkout_path, self.branch)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488466&selected=1575926708336488466) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488466&selected=1575926708336488466)   File "/app/pontoon/sync/vcs/repositories.py", line 272, in update_from_vcs
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488467&selected=1575926708336488467) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488467&selected=1575926708336488467)     obj.pull()
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488468&selected=1575926708336488468) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488468&selected=1575926708336488468)   File "/app/pontoon/sync/vcs/repositories.py", line 87, in pull
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488469&selected=1575926708336488469) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488469&selected=1575926708336488469)     raise PullFromRepositoryException(str(error))
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488470&selected=1575926708336488470) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488470&selected=1575926708336488470) pontoon.sync.vcs.repositories.PullFromRepositoryException: ** unknown exception encountered, please report by visiting
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488471&selected=1575926708336488471) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488471&selected=1575926708336488471) ** https://mercurial-scm.org/wiki/BugTracker
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488472&selected=1575926708336488472) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488472&selected=1575926708336488472) ** Python 3.9.16 (main, Dec  7 2022, 00:02:49) [GCC 11.3.0]
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488473&selected=1575926708336488473) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488473&selected=1575926708336488473) ** Mercurial Distributed SCM (version 5.2.2)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488474&selected=1575926708336488474) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488474&selected=1575926708336488474) ** Extensions loaded: 
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488475&selected=1575926708336488475) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488475&selected=1575926708336488475) Traceback (most recent call last):
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488476&selected=1575926708336488476) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488476&selected=1575926708336488476)   File "/app/.heroku/python/bin/hg", line 36, in <module>
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488477&selected=1575926708336488477) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488477&selected=1575926708336488477)     dispatch.run()
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488478&selected=1575926708336488478) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488478&selected=1575926708336488478)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 111, in run
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488479&selected=1575926708336488479) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488479&selected=1575926708336488479)     status = dispatch(req)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488480&selected=1575926708336488480) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488480&selected=1575926708336488480)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 250, in dispatch
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488481&selected=1575926708336488481) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488481&selected=1575926708336488481)     ret = _runcatch(req) or 0
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488482&selected=1575926708336488482) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488482&selected=1575926708336488482)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 424, in _runcatch
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488483&selected=1575926708336488483) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488483&selected=1575926708336488483)     return _callcatch(ui, _runcatchfunc)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488484&selected=1575926708336488484) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488484&selected=1575926708336488484)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 433, in _callcatch
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488485&selected=1575926708336488485) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488485&selected=1575926708336488485)     return scmutil.callcatch(ui, func)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488486&selected=1575926708336488486) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488486&selected=1575926708336488486)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/scmutil.py", line 177, in callcatch
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488487&selected=1575926708336488487) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488487&selected=1575926708336488487)     return func()
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488488&selected=1575926708336488488) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488488&selected=1575926708336488488)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 414, in _runcatchfunc
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488489&selected=1575926708336488489) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488489&selected=1575926708336488489)     return _dispatch(req)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488490&selected=1575926708336488490) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488490&selected=1575926708336488490)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 1173, in _dispatch
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488491&selected=1575926708336488491) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488491&selected=1575926708336488491)     return runcommand(
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488492&selected=1575926708336488492) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488492&selected=1575926708336488492)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 862, in runcommand
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488493&selected=1575926708336488493) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488493&selected=1575926708336488493)     ret = _runcommand(ui, options, cmd, d)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488494&selected=1575926708336488494) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488494&selected=1575926708336488494)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 1185, in _runcommand
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488495&selected=1575926708336488495) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488495&selected=1575926708336488495)     return cmdfunc()
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488496&selected=1575926708336488496) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488496&selected=1575926708336488496)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/dispatch.py", line 1171, in <lambda>
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488497&selected=1575926708336488497) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488497&selected=1575926708336488497)     d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488498&selected=1575926708336488498) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488498&selected=1575926708336488498)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/util.py", line 1843, in check
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488499&selected=1575926708336488499) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488499&selected=1575926708336488499)     return func(*args, **kwargs)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488500&selected=1575926708336488500) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488500&selected=1575926708336488500)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/commands.py", line 1912, in clone
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488501&selected=1575926708336488501) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488501&selected=1575926708336488501)     r = hg.clone(
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488502&selected=1575926708336488502) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488502&selected=1575926708336488502)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/hg.py", line 983, in clone
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488503&selected=1575926708336488503) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488503&selected=1575926708336488503)     _update(destrepo, uprev)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488504&selected=1575926708336488504) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488504&selected=1575926708336488504)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/hg.py", line 1030, in update
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488506&selected=1575926708336488506) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488506&selected=1575926708336488506)     stats = updaterepo(repo, node, False, updatecheck=updatecheck)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488507&selected=1575926708336488507) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488507&selected=1575926708336488507)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/hg.py", line 1018, in updaterepo
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488508&selected=1575926708336488508) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488508&selected=1575926708336488508)     return mergemod.update(
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488509&selected=1575926708336488509) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488509&selected=1575926708336488509)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/merge.py", line 2557, in update
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488511&selected=1575926708336488511) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488511&selected=1575926708336488511)     stats, getfiledata = applyupdates(
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488512&selected=1575926708336488512) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488512&selected=1575926708336488512)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/merge.py", line 1927, in applyupdates
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488513&selected=1575926708336488513) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488513&selected=1575926708336488513)     for final, res in prog:
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488515&selected=1575926708336488515) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488515&selected=1575926708336488515)   File "/app/.heroku/python/lib/python3.9/site-packages/mercurial/worker.py", line 243, in _posixworker
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488516&selected=1575926708336488516) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488516&selected=1575926708336488516)     res = util.pickle.load(key.fileobj)
Mar 24 14:17:09 [mozilla-pontoon](https://my.papertrailapp.com/systems/mozilla-pontoon/events?focus=1575926708336488517&selected=1575926708336488517) [app/worker.1](https://my.papertrailapp.com/events?q=program%3Aapp%2Fworker.1&focus=1575926708336488517&selected=1575926708336488517) _pickle.UnpicklingError: pickle data was truncated
```


Discussion:
Each locale is 11k strings for Thunderbird, and we have 69 locales. If one locale lands something, does that trigger an update for all locales, since the last hash of the repo changed?

Resolving patch:
diff --git a/pontoon/sync/core.py b/pontoon/sync/core.py
--- a/pontoon/sync/core.py
+++ b/pontoon/sync/core.py
@@ -378,9 +378,10 @@ def get_changed_locales(db_project, locales, now):
     """
     repos = db_project.translation_repositories()
 
-    # Requirement: all translation repositories must have API configured.
+    # Requirement: all translation repositories must have API configured
+    # and must be multi-locale repositories.
     for repo in repos:
-        if not repo.api_config:
+        if not repo.api_config and not repo.multi_locale:
             return locales
 
     log.info(f"Fetching latest commit hashes for project {db_project.slug} started.")


Test patch: