n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
49.52k stars 7.99k forks source link

AI nodes timeout after 5m #11886

Open matiashegoburu opened 9 hours ago

matiashegoburu commented 9 hours ago

Bug Description

When using AI nodes with local model, sometimes they take more than 5 mins to respond, which causes fetch to timeout (i looked through the code and past changes, and it seems to be set to 300 seconds aka 5 mins). Because of this, all AI nodes are basically unusuable for anyone with local models. Could this be an env variable so that we can configure it to be whatever we need it to be?

This is the error that all AI nodes give when the model takes more than 5 mins to respond:

{ "name": "HeadersTimeoutError", "code": "UND_ERR_HEADERS_TIMEOUT", "message": "Headers Timeout Error" }

To Reproduce

Use an LLM node, and use a model that will take more than 5 mins to respond.

Expected behavior

it does not timeout and actually gets the response back from the llm.

Operating System

ubuntu 24.04

n8n Version

1.68.0

Node.js Version

18.16

Database

SQLite (default)

Execution mode

main (default)

Joffcom commented 9 hours ago

Hey @matiashegoburu,

We have created an internal ticket to look into this which we will be tracking as "GHC-501"