diff --git a/posthog/tasks/exporter.py b/posthog/tasks/exporter.py index 8ab5b392cf0d6..6d7ee8ab2cd98 100644 --- a/posthog/tasks/exporter.py +++ b/posthog/tasks/exporter.py @@ -6,6 +6,7 @@ from django.db import transaction from posthog import settings +from posthog.errors import CHQueryErrorTooManySimultaneousQueries from posthog.models import ExportedAsset from posthog.tasks.utils import CeleryQueue @@ -43,6 +44,10 @@ ignore_result=False, time_limit=settings.ASSET_GENERATION_MAX_TIMEOUT_SECONDS, queue=CeleryQueue.EXPORTS.value, + autoretry_for=(CHQueryErrorTooManySimultaneousQueries,), + retry_backoff=1, + retry_backoff_max=3, + max_retries=3, ) @transaction.atomic def export_asset(exported_asset_id: int, limit: Optional[int] = None) -> None: