[GH-ISSUE #5720] ollama-docker-app using 100% without reason in idle state #3562

Closed
opened 2026-04-12 14:17:16 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @jan-panoch on GitHub (Jul 16, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5720

What is the issue?

we are runnig ollama with docker and container ollama-docker-app-1 in idletime is consuming 100% cpu without reason. no always, but occasionally. restart helps.

the olllama docker stack is started using docker compose file https://github.com/valiantlynx/ollama-docker/blob/main/docker-compose-ollama-gpu.yaml

when i look into container ollama-docker-app-1 i see 2 python processes using 100% cpu - id 13 and id 43. here is pstree:

uvicorn(1)─┬─python(7)
├─python(8)─┬─{python}(17)
│ ├─{python}(18)
│ ├─{python}(20)
│ └─{python}(21)
├─python(13)─┬─{python}(15)
│ ├─{python}(16)
│ ├─{python}(19)
│ └─{python}(43)
└─{uvicorn}(9)

here are cmdlines of bad processes:

root@ce73cb00b056:/code# cat /proc/13/cmdline
/usr/local/bin/python/usr/local/lib/python3.11/site-packages/debugpy/adapter--for-server60015--host0.0.0.0--port5678--server-access-token69fbba1e901ac3b269a1f62151fd6306108d2e5cc5300616cd4574282cfd4a56root@ce73cb00b056:/code# cat /proc/43/cmdline
/usr/local/bin/python/usr/local/lib/python3.11/site-packages/debugpy/adapter--for-server60015--host0.0.0.0--port5678--server-access-token69fbba1e901ac3b269a1f62151fd6306108d2e5cc5300616cd4574282

here is strace:

root@ce73cb00b056:/code# strace -p 13
strace: Process 13 attached
futex(0x5604f9e11fc0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY^Cstrace: Process 13 detached
<detached ...>

and

root@ce73cb00b056:/code# strace -p 43
strace: Process 43 attached
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
recvfrom(9, "", 1, 0, NULL, NULL) = 0
....
....
....
....
...until break

any ideas?

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.2.5

Originally created by @jan-panoch on GitHub (Jul 16, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5720 ### What is the issue? we are runnig ollama with docker and container ollama-docker-app-1 in idletime is consuming 100% cpu without reason. no always, but occasionally. restart helps. the olllama docker stack is started using docker compose file https://github.com/valiantlynx/ollama-docker/blob/main/docker-compose-ollama-gpu.yaml when i look into container ollama-docker-app-1 i see 2 python processes using 100% cpu - id 13 and id 43. here is pstree: uvicorn(1)─┬─python(7) ├─python(8)─┬─{python}(17) │ ├─{python}(18) │ ├─{python}(20) │ └─{python}(21) ├─python(13)─┬─{python}(15) │ ├─{python}(16) │ ├─{python}(19) │ └─{python}(43) └─{uvicorn}(9) here are cmdlines of bad processes: root@ce73cb00b056:/code# cat /proc/13/cmdline /usr/local/bin/python/usr/local/lib/python3.11/site-packages/debugpy/adapter--for-server60015--host0.0.0.0--port5678--server-access-token69fbba1e901ac3b269a1f62151fd6306108d2e5cc5300616cd4574282cfd4a56root@ce73cb00b056:/code# cat /proc/43/cmdline /usr/local/bin/python/usr/local/lib/python3.11/site-packages/debugpy/adapter--for-server60015--host0.0.0.0--port5678--server-access-token69fbba1e901ac3b269a1f62151fd6306108d2e5cc5300616cd4574282 here is strace: root@ce73cb00b056:/code# strace -p 13 strace: Process 13 attached futex(0x5604f9e11fc0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY^Cstrace: Process 13 detached <detached ...> and root@ce73cb00b056:/code# strace -p 43 strace: Process 43 attached recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 recvfrom(9, "", 1, 0, NULL, NULL) = 0 .... .... .... .... ...until break any ideas? ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.2.5
GiteaMirror added the bug label 2026-04-12 14:17:16 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 16, 2024):

Should probably be filed in https://github.com/valiantlynx/ollama-docker/issues. Those processes are listening on port 5678, which according to docker-compose-ollama-gpu.yaml is the app service, which is not part of the ollama project.

<!-- gh-comment-id:2230468268 --> @rick-github commented on GitHub (Jul 16, 2024): Should probably be filed in https://github.com/valiantlynx/ollama-docker/issues. Those processes are listening on port 5678, which according to docker-compose-ollama-gpu.yaml is the `app` service, which is not part of the ollama project.
Author
Owner

@dhiltgen commented on GitHub (Jul 23, 2024):

Agreed, this doesn't seem to be a defect from Ollama itself. If you can create an isolated repro scenario showing it is an ollama defect, please share the details and I'll reopen the issue.

<!-- gh-comment-id:2244030653 --> @dhiltgen commented on GitHub (Jul 23, 2024): Agreed, this doesn't seem to be a defect from Ollama itself. If you can create an isolated repro scenario showing it is an ollama defect, please share the details and I'll reopen the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3562