[GH-ISSUE #7582] Ollama AsyncClinet keep reloading model #51344

Closed
opened 2026-04-28 19:37:00 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @SnowFox4004 on GitHub (Nov 9, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7582

What is the issue?

Problem

Ollama keeps reload the same model while using AsyncClient.chat()
image
When I await the same function again, the model in mem will be unload and reload.like this.
image
the keep_alive parameter doesn't work.
I have changed the /etc/systemd/system/ollama.service like this
image

Expected

ollama only load the model once and do not reload the model while using.

OS

Windows, WSL2

GPU

Nvidia

CPU

Intel

Ollama version

0.3.6

Originally created by @SnowFox4004 on GitHub (Nov 9, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7582 ### What is the issue? ## Problem Ollama keeps reload the same model while using AsyncClient.chat() ![image](https://github.com/user-attachments/assets/cc8f77f4-2cc9-491f-9aa7-108c39e809a7) When I `await` the same function again, the model in mem will be unload and reload.like this. ![image](https://github.com/user-attachments/assets/dc7035bd-7f16-41c8-a324-1759165bf1c6) the `keep_alive` parameter doesn't work. I have changed the `/etc/systemd/system/ollama.service` like this ![image](https://github.com/user-attachments/assets/d2d71a21-cc40-474b-b735-ab61dc415369) ## Expected ollama only load the model once and do not reload the model while using. ### OS Windows, WSL2 ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.6
GiteaMirror added the bug label 2026-04-28 19:37:00 -05:00
Author
Owner

@SnowFox4004 commented on GitHub (Nov 9, 2024):

Actually I just found that chating in cli also has this problem. I think there might be something wrong in ollama.So here is the recent log of ollama
ollama_log.txt

<!-- gh-comment-id:2466030928 --> @SnowFox4004 commented on GitHub (Nov 9, 2024): Actually I just found that chating in cli also has this problem. I think there might be something wrong in ollama.So here is the recent log of ollama [ollama_log.txt](https://github.com/user-attachments/files/17685922/ollama_log.txt)
Author
Owner

@rick-github commented on GitHub (Nov 9, 2024):

This looks like a bug that was fixed in 0.3.7. Try upgrading.

<!-- gh-comment-id:2466248956 --> @rick-github commented on GitHub (Nov 9, 2024): This looks like a bug that was [fixed](https://github.com/ollama/ollama/pull/6402) in 0.3.7. Try [upgrading](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-upgrade-ollama).
Author
Owner

@SnowFox4004 commented on GitHub (Nov 10, 2024):

This looks like a bug that was fixed in 0.3.7. Try upgrading.

Thanks very much. I upgrade it and the problem is fixed.

<!-- gh-comment-id:2466629306 --> @SnowFox4004 commented on GitHub (Nov 10, 2024): > This looks like a bug that was [fixed](https://github.com/ollama/ollama/pull/6402) in 0.3.7. Try [upgrading](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-upgrade-ollama). Thanks very much. I upgrade it and the problem is fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51344