Handling Long-Running n8n Workflows: Solutions for Browser Timeout During API GET Requests?

Describe the problem/error/question

When initiating a long-running workflow via an API GET request in a browser, the request times out after approximately 2 minutes, even though the workflow successfully continues to execute and completes in roughly 8 minutes as indicated in the n8n execution list. The goal is to receive a JSON response from the final “Respond to Webhook” node, but the early timeout in the browser prevents this, interrupting the expected data retrieval. The question is how to manage or adjust the settings to handle such scenarios where the browser’s timeout limit is exceeded by the duration of the workflow.

What is the error message (if any)?

Error code 524

Share the output returned by the last node

Just a JSON response like this format after processing the entire workflow, involves between 2 to 5 API calls + data processing trough 2 AI models:

[
  {
    "appended_bullet": [
      "In enim justo rhoncus ut",
      "Vivamus aliquet elit ac nisl",
      "Donec mi odio faucibus at",
      "Ut non enim eleifend felis",
      "Aenean leo ligula porttitor eu"
    ]
  }
]

Information on your n8n setup

  • n8n version: 1.36.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

Hello @elvismdev

I think the best option is to use another way of receiving the response, like email.

Most of the browsers keep a session for 60-120 seconds. Then, if no response is given, they break the session. And as far as I know, n8n can’t send the keep-alive until the response is ready to be sent (@Jon correct me if I’m wrong). So from the browser perspective, an 8-minutes-long response always will be dead

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.