Timeouts

This page documents the various timeout limits in the Tailor Platform services. Understanding these timeouts is essential for building robust applications that can handle potential delays or failures gracefully.

Overview

Timeouts are enforced across different services in the Tailor Platform to ensure system stability, resource management, and prevent indefinite blocking of resources. Each service has specific timeout values based on its intended use case and operational requirements.

Service Timeouts

ServiceTimeout ValueDescriptionImpact
Gateway Timeout60 secondsMax time for API gateway request processingRequest terminated if it exceeds 60s
Pipeline Service60 secondsMax time for pipeline resolver executionPipeline operation terminated if it exceeds 60s
Executor Service60 secondsMax time for TargetTailorGraphql and TargetWebhook operations to completeFailure triggers retry (up to 10 attempts) if it exceeds 60s
TailorDB Hooks2 secondsMax time for TailorDB's PreHook and PostHook operationsHook is terminated and returns an error if it exceeds 2s
Pipeline Hooks2 secondsMax time for Pipeline's PreHook and PostHook operationsHook is terminated and returns an error if it exceeds 2s
Function Service10 secondsMax time for a Function service operationExecution is terminated and returns an error if it exceeds 10s
JobFunction24 hoursMax time for a JobFunction to complete its executionJob function is terminated and returns an error if it exceeds 24 hours

Best Practices

When working with services that have timeout constraints, consider the following best practices:

  1. Design for timeouts: Anticipate timeouts and handle them gracefully.

  2. Implement retry mechanisms: For operations that might occasionally exceed timeout limits, implement appropriate retry logic with exponential backoff.

  3. Simplify operations: Break down long tasks into smaller steps to avoid timeouts.

  4. Choose suitable services: Use services like JobFunction for long-running tasks.

  5. Monitor performance: Track operation performance to detect timeout risks early.

  6. Optimize queries: Ensure database queries complete within timeout limits, especially for hooks that have stricter timeout constraints.

  7. Cache frequently accessed data: Cache frequently accessed data to reduce processing time.