AI Agent node hangs and stops workflow execution (connection lost)

I’m experiencing a blocking issue in a large n8n AI-based disease prediction workflow.

When the workflow reaches the AI Agent node, execution starts normally, but the node keeps waiting for a response for a long time and then the workflow stops executing entirely. After that, the execution fails and does not continue to downstream nodes (e.g. Gmail “Send a message”).

In many executions, the UI shows “connection lost” while the AI Agent node is running. The workflow does not crash immediately, but eventually fails after a minute and something.

This issue is reproducible and happens consistently whenever execution reaches the AI Agent node.

The workflow includes:

  • Multiple HTTP requests (weather history, forecast, past data)

  • Data merging and feature engineering

  • Custom calculations

  • An AI Agent node (OpenAI Chat Model) near the end of the workflow

The same workflow executes correctly up until the AI Agent node.

There is no explicit error message returned by the AI Agent node itself.

Observed symptoms:

  • Execution hangs on the AI Agent node

  • UI sometimes displays “Connection lost”

  • Execution history shows repeated failures (see screenshot)

  • n8n version: 2.1.4

  • Database (default: SQLite): PostgreSQL

  • n8n EXECUTIONS_PROCESS setting (default: own, main): own

  • Running n8n via (Docker, npm, n8n cloud, desktop app): Render

  • Operating system: Linux

Hey there, try increasing the node timeout (in the settings tab). Also turn the “Retry on Fail” on. If this doesn’t help, try changing the executions_process from own to main… it might help overcome this problem.

Also… it might be an issue with Render itself… as there might be memory limits and http request timeouts…?

I have fixed the issue and the issue was I had to pay for more RAM thank you everyone!