GuideFlowsTimeouts

Timeouts

Understanding the different timeout limits that apply to your flows and how they affect execution.

Key Point

Flow execution itself has no timeout. Flows will run until completion regardless of how long they take. However, HTTP connections have timeouts that affect webhook responses and external requests.

Server Request Timeout

The server request timeout is the maximum time allowed for a complete HTTP request-response cycle. This applies to all requests entering or leaving the Serenities AI system.

Server Timeout
45 minutes

Maximum time for any request-response cycle

What This Timeout Covers

Incoming Requests

When external services (n8n, Make, Zapier) call your webhooks

Outgoing Requests

When your flows make HTTP requests to external APIs

Response Time

Time from request received until response is sent back

Important for Webhook Integrations

If you're calling Serenities AI webhooks from external platforms, ensure their HTTP timeout settings are also configured appropriately. The connection will timeout based on whichever limit is reached first - yours or theirs.

Node-Level Timeouts

Individual nodes within your flows have their own timeout limits. These are separate from the server timeout and apply to specific operations.

Node Timeout Limits
HTTP Request

Time to wait for external API responses

10 min
Code (JavaScript)

Hard limit - cannot be increased

30 sec max
Wait

Intentional delay between steps

Configurable

Flow Execution

No Timeout Limit

Flow execution itself has no timeout limit. Once a flow starts, it will continue running until all nodes have completed, regardless of total duration.

This is by design to support long-running processes like:

Batch processing large datasets
Multi-step AI workflows
Voice generation and media processing
Complex data transformations

Webhook Response Considerations

When using webhooks that require a response (synchronous webhooks), the calling service must wait for your flow to complete before receiving the response.

Timeout Hierarchy - Shortest Wins
Caller's HTTP timeout (e.g., n8n node settings)
Serenities AI server timeout (45 minutes)
Individual node timeouts within the flow

Long-Running Flows

If your flow takes longer than the caller's timeout setting, they will receive a timeout error even though your flow continues to execute successfully. Consider these alternatives:

Asynchronous Patterns

Return immediately and use a callback webhook to send results

Polling

Return a job ID and let the caller poll for results

Fire-and-Forget

Use webhooks that don't require a response

Troubleshooting Timeouts

504 Gateway Timeout

If you receive a 504 Gateway Timeout error when calling a webhook:

1
Check flow execution history

The flow may have completed successfully even if the response timed out

2
Review caller's timeout settings

Increase the HTTP request timeout in your automation platform

3
Consider async patterns

For flows longer than a few minutes, use asynchronous webhook patterns

Node Timeout Errors

If a specific node times out:

  • HTTP Request:Check if the external API is slow or unresponsive
  • Code node:Optimize your code or break it into smaller chunks (30 sec max)
Timeouts | User Guide