Long chat responses time out

Describe the problem/error/question

Any chat response that takes longer than 100 seconds is never returned to the chat (in hosted chat) and if I test the webhook version, the request returns a 524 error after exactly 100 seconds. I can see in the execution log that the request does return successfully after ~3 minutes but the web request has long timed out at that point.

What is the error message (if any)?

524 Timeout

Please share your workflow

It’s an AI agent with chat node. Lots of tools connected. Requests generally take about 3 minutes to finish.

Share the output returned by the last node

The output is exactly what you would expect, it’s just not returned to the requester in webhook or hosted chat mode.

Information on your n8n setup

  • n8n version: [email protected] on Cloud w/ paid plan
  • Database (default: SQLite): cloud
  • n8n EXECUTIONS_PROCESS setting (default: own, main): cloud
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: cloud

Please go to your workflow settings:

See if you have enabled a limit to the workflow timeout. This should be disabled.

Yeah that’s already disabled. The workflow itself doesn’t time out. It completes its work, but it appears that some request that the chat UI is making must time out and then it never receives the result back from the workflow.

I am able to enter the execution history to see the result that should have been returned to the chat.

Are you able to test, using the chat trigger, inside the editor and still see the same issue?

Or does it work when testing?

I am also facing same issue in Public Chat. POST request times out after 1 minute. Workflow execution is completed successfully after 90 seconds. Public Chat doesn’t receive any response. Issue doesn’t happen, when tested with Chat trigger.

Isn’t the problem that the n8n webhook has Cloudflare sitting in front of it timing out the requests? I’m getting timeouts without using Cloudflare, they’re coming directly from the webhook

The 100 seconds timeout is a limitation imposed by Cloudflare, which is used as a proxy in front of n8n Cloud. Unfortunetly there is no work around it at the moment.

Issue happening with Docker version of n8n as well. I am using n8n on docker(nginx) and own domain name. No Cloudfare involved

nginx has several timeout settings when acting as a proxy:

  • proxy_connect_timeout – Default: 60 seconds

    • This defines how long nginx waits to establish a connection with the upstream server.
  • proxy_read_timeout – Default: 60 seconds

    • This is the maximum time nginx waits for a response from the upstream server.
  • proxy_send_timeout – Default: 60 seconds

    • This sets the timeout for sending requests to the upstream server.

These values can be adjusted in the nginx configuration file (nginx.conf) under the http, server, or location blocks. If you’re experiencing timeout issues, tweaking these settings can help. As an example, see the solution suggested in https://www.baeldung.com/linux/nginx-timeouts.