-
Notifications
You must be signed in to change notification settings - Fork 16.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ollama node “keep alive” setting has no effect on local n8n install #13655
Comments
Hey @miabe3003, We have created an internal ticket to look into this which we will be tracking as "GHC-1037" |
Hey @miabe3003, From what I can see the keep alive is not linked to how long we should wait for a response but instead it is how long ollama should keep the model in memory after being called. |
Hi @Joffcom , thanks for the feedback! Yes it looks like it unloads the model from ollama after 5 minutes which causes the error. If I could keep it alive for lets say 30 minutes it would be sufficient to solve my request, but it looks like the keep alive setting is not passed to ollama. No matter what I entered there, after 300.000ms the error "fetch failed" is shown as the model is not longer available I guess. |
Hey @miabe3003, I have done a quick test and we do send
Could there be an issue with ollama, I have taken a quick look and there are a few issues open around keep_alive not appearing to work and dropping from memory. |
Hi @Joffcom , thanks for testing the keep_alive function and you are right, the keep_alive is not the problem. I am closing this ticket and will investigate further using the HTTP request. Will open a new ticket if I pin the issue down... |
Bug Description
Describe the problem/error/question
I have n8n running locally on my raspi and using it with Ollama. All works fine except that I run easily in a timeout situation with longer prompts as the ollama (chat) model node throws an error after exactly 5 minutes.
I suspect that that the default “keep alive” setting causes this problem, but setting it to 50m oder -1m does not have any effect.
What is the error message (if any)?
{
"errorMessage": "fetch failed",
"errorDetails": {},
"n8nDetails": {
"time": "26.2.2025, 20:40:04",
"n8nVersion": "1.78.1 (Self Hosted)",
"binaryDataMode": "default",
"cause": {}
}
}
Share the output returned by the last node
{
"errorMessage": "fetch failed",
"errorDetails": {},
"n8nDetails": {
"time": "26.2.2025, 20:40:04",
"n8nVersion": "1.78.1 (Self Hosted)",
"binaryDataMode": "default",
"cause": {}
}
}
I noticed this default timeout and tried to override it with this “keep alive” setting in the Ollama Chat Model Node:
I tried to use a negative number as well to disable it, but no effect.
Unfortunately the node always stops after the default 5 minutes:
Updated to n8n 1.80.3 but still same results.
To Reproduce
Expected behavior
shoud respect the time value entered in the keep alive setting.
(Ollama works fine when I access it via the Open WebUI app.)
Operating System
Linux Debian 6.6.51
n8n Version
1.80.3
Node.js Version
don't know, running on UmbrelOS 1.3
Database
SQLite (default)
Execution mode
main (default)
The text was updated successfully, but these errors were encountered: