A timeout occurs when a process exceeds a preset time limit. Timeouts can cause unexpected behavior, failed operations, and poor application performance. The issue becomes more significant as application scale increases.
This guide explains where timeouts occur in Unqork and how to prevent them.
Workflow Timeouts
Automated workflow lanes have a five-minute operation limit in the Production environment. Each module included in the workflow has an individual two-minute limit. If either limit is exceeded, the workflow stops.
Note: The five-minute and two-minute limits do not apply to QA or Staging environments, but workflows promoted to Production are subject to both limits.
Preventing Workflow Timeouts
Process large datasets in batches. Instead of processing all submissions simultaneously, break the dataset into smaller groups and process each group in sequence. Batches of 20 submissions are a reliable and efficient size—larger batches risk overloading the server with simultaneous calls.
Use a Timer node for long-running operations. A Timer node can extend an automated workflow beyond the default timeout window. Configure the Timer node on the task or Sub-Process node where the operation runs.
Data Workflow Timeouts
Data Workflow components have a two-minute execution limit. Complex pipelines with large datasets are the most common cause of Data Workflow timeouts.
Preventing Data Workflow Timeouts
Separate large Data Workflows into smaller ones. Each smaller pipeline runs more quickly and is less likely to time out. A modular approach also makes each step easier to troubleshoot.
Place Filter operators early in the pipeline. Filtering submissions early reduces the dataset that later operators must process, improving overall performance.
Use batch loops for large datasets. Batch loops let a Data Workflow component process a subset of submissions at a time, repeating until all submissions are handled. This keeps each iteration well in the two-minute limit.
Plug-In Component Timeouts
The Set Timeout setting in the Plug-In component controls the maximum time the component waits for a response from a called module or external service. The maximum configurable value is 300,000 milliseconds (5 minutes). If no value is set, the default timeout is 120,000 ms (2 minutes).
Important: The Plug-In component timeout is a client-side timeout only. When the timeout is reached, the component stops waiting for a response—but the server-side module or external service might continue running. A triggered server-side module might run for longer than two minutes even though the Plug-In component has already stopped waiting.
External services have their own timeout limits. Always check the external service's documentation to verify its execution duration and timeout constraints.
Database and Submission Performance
As submissions accumulate, query performance decreases if unnecessary submissions are not removed. Removing stale submissions using an automated workflow keeps the database lean and queries fast.
Use indexed queries where possible. Queries against indexed fields are significantly faster than unindexed queries, especially as submission counts grow.
Clean up unnecessary submissions regularly. Build an automated workflow to delete submissions that are no longer needed. This prevents gradual performance degradation over time.
Changelog
| Date | Change |
|---|---|
| — | Initial publication. |