[GH-ISSUE #1588] [BUG]: When querying Ollama through AnythingLLM, the call is resetting the time the model is in Memory from unlimited, to 5 minutes #1031

Closed
opened 2026-02-22 18:22:47 -05:00 by yindo · 1 comment
Owner

Originally created by @andrewjmoser on GitHub (May 31, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1588

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Running Ollama and AnythingLLM on the same machine, Windows 2022 in this case. I have Ollama set to start the model at logon, running this command, to warm the model, ollama run llama3:8b-instruct-q8_0 "" I also have the user and system environment variables set for OLLAMA_KEEP_ALIVE to -1 so the model will stay in RAM forever. I can confirm this is working at logon by running ollama ps, and I see the model running, and the UNTIL section, shows "forever". This stays like this, until I run any query, in Anything LLM, it then the time the model is in memory, changes, from forever, to 4 minutes from now. I am not sure this is an AnythingLLM issue in maybe the way they are querying Ollama, or an Ollama issue in not consistently honoring the OLLAMA_KEEP_ALIVE value in between queries so figured I would ask here first. My goal is to have the model in memory, forever, no matter what.

Are there known steps to reproduce?

Set the environment variable OLLAMA_KEEP_ALIVE to -1, and launch any model in ollama, run ollama ps and the UNTIL metric will show forever. Launch AnythingLLM and run a query, and it changes the behavior of Ollama to start a 5 minute countdown to remove the model from memory.

Originally created by @andrewjmoser on GitHub (May 31, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1588 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Running Ollama and AnythingLLM on the same machine, Windows 2022 in this case. I have Ollama set to start the model at logon, running this command, to warm the model, ollama run llama3:8b-instruct-q8_0 "" I also have the user and system environment variables set for OLLAMA_KEEP_ALIVE to -1 so the model will stay in RAM forever. I can confirm this is working at logon by running ollama ps, and I see the model running, and the UNTIL section, shows "forever". This stays like this, until I run any query, in Anything LLM, it then the time the model is in memory, changes, from forever, to 4 minutes from now. I am not sure this is an AnythingLLM issue in maybe the way they are querying Ollama, or an Ollama issue in not consistently honoring the OLLAMA_KEEP_ALIVE value in between queries so figured I would ask here first. My goal is to have the model in memory, forever, no matter what. ### Are there known steps to reproduce? Set the environment variable OLLAMA_KEEP_ALIVE to -1, and launch any model in ollama, run ollama ps and the UNTIL metric will show forever. Launch AnythingLLM and run a query, and it changes the behavior of Ollama to start a 5 minute countdown to remove the model from memory.
yindo added the possible buginvestigating labels 2026-02-22 18:22:47 -05:00
yindo closed this issue 2026-02-22 18:22:48 -05:00
Author
Owner

@timothycarambat commented on GitHub (May 31, 2024):

moved to #1585

@timothycarambat commented on GitHub (May 31, 2024): moved to #1585
yindo changed title from [BUG]: When querying Ollama through AnythingLLM, the call is resetting the time the model is in Memory from unlimited, to 5 minutes to [GH-ISSUE #1588] [BUG]: When querying Ollama through AnythingLLM, the call is resetting the time the model is in Memory from unlimited, to 5 minutes 2026-06-05 14:38:35 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1031