[GH-ISSUE #837] Ollama server stops responding. #78078

Closed
opened 2026-05-08 21:49:24 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @UYousafzai on GitHub (Oct 18, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/837

API Call:

/api/generate

Note:

The server keeps working until left idle for a long time, I get this trace with error: "no child processes" upon request after the idle state.

I have also observed this behavior upon requesting from two different terminals at the same time.

Full Trace:

llama_print_timings: load time = 6042.33 ms
llama_print_timings: sample time = 19.14 ms / 54 runs ( 0.35 ms per token, 2822.05 tokens per second)
llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)
llama_print_timings: eval time = 5461.00 ms / 54 runs ( 101.13 ms per token, 9.89 tokens per second)
llama_print_timings: total time = 5490.18 ms
{"timestamp":1697544483,"level":"INFO","function":"log_server_request","line":1157,"message":"request","remote_addr":"127.0.0.1","remote_port":41622,"status":200,"method":"POST","path":"/completion","params":{}}
{"timestamp":1697544483,"level":"INFO","function":"log_server_request","line":1157,"message":"request","remote_addr":"127.0.0.1","remote_port":53162,"status":200,"method":"POST","path":"/tokenize","params":{}}
[GIN] 2023/10/17 - 12:08:03 | 200 | 5.491869831s | 172.17.0.1 | POST "/api/generate"
2023/10/17 12:13:03 llama.go:323: llama runner exited with error: wait: no child processes

Key Trace:

[GIN] 2023/10/17 - 12:08:03 | 200 | 5.491869831s | 172.17.0.1 | POST "/api/generate"
2023/10/17 12:13:03 llama.go:323: llama runner exited with error: wait: no child processes

Originally created by @UYousafzai on GitHub (Oct 18, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/837 API Call: ---------------- /api/generate Note: ---------------- The server keeps working until left idle for a long time, I get this trace with error: "no child processes" upon request after the idle state. I have also observed this behavior upon requesting from two different terminals at the same time. Full Trace: ---------------- llama_print_timings: load time = 6042.33 ms llama_print_timings: sample time = 19.14 ms / 54 runs ( 0.35 ms per token, 2822.05 tokens per second) llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second) llama_print_timings: eval time = 5461.00 ms / 54 runs ( 101.13 ms per token, 9.89 tokens per second) llama_print_timings: total time = 5490.18 ms {"timestamp":1697544483,"level":"INFO","function":"log_server_request","line":1157,"message":"request","remote_addr":"127.0.0.1","remote_port":41622,"status":200,"method":"POST","path":"/completion","params":{}} {"timestamp":1697544483,"level":"INFO","function":"log_server_request","line":1157,"message":"request","remote_addr":"127.0.0.1","remote_port":53162,"status":200,"method":"POST","path":"/tokenize","params":{}} [GIN] 2023/10/17 - 12:08:03 | 200 | 5.491869831s | 172.17.0.1 | POST "/api/generate" 2023/10/17 12:13:03 llama.go:323: llama runner exited with error: wait: no child processes Key Trace: ---------------- [GIN] 2023/10/17 - 12:08:03 | 200 | 5.491869831s | 172.17.0.1 | POST "/api/generate" 2023/10/17 12:13:03 llama.go:323: llama runner exited with error: wait: no child processes
GiteaMirror added the bug label 2026-05-08 21:49:24 -05:00
Author
Owner

@mchiang0610 commented on GitHub (Oct 18, 2023):

Hi @UYousafzai thank you for submitting this. May I ask how and where you are running the Ollama server?

<!-- gh-comment-id:1768939776 --> @mchiang0610 commented on GitHub (Oct 18, 2023): Hi @UYousafzai thank you for submitting this. May I ask how and where you are running the Ollama server?
Author
Owner

@UYousafzai commented on GitHub (Oct 18, 2023):

I am running this on my local server:

###OS Details
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

###Processor Details:
Model Name: AMD Ryzen 9 7950X 16-Core Processor
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit

Note:
I do have a 4090 GPU however for the testing I am nor running the server in GPU mode and I am only utilizing the CPU.

With the short time that I had I tried looking into any specific timeout functions for the server but I couldn't find any specific ones that triggered on being left idle (this is just my assumption that the ones I did find weren't of this nature).

<!-- gh-comment-id:1769097837 --> @UYousafzai commented on GitHub (Oct 18, 2023): I am running this on my local server: ###OS Details Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy ###Processor Details: Model Name: AMD Ryzen 9 7950X 16-Core Processor Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Note: I do have a 4090 GPU however for the testing I am nor running the server in GPU mode and I am only utilizing the CPU. With the short time that I had I tried looking into any specific timeout functions for the server but I couldn't find any specific ones that triggered on being left idle (this is just my assumption that the ones I did find weren't of this nature).
Author
Owner

@mxyng commented on GitHub (Oct 18, 2023):

Other than the log message, is there any indication ollama isn't working as expected? The model gets unloaded after 5 minutes of inactivity to free up resources. The logs indicate this behaviour seems to be working albeit with an unexpected error message

<!-- gh-comment-id:1769453437 --> @mxyng commented on GitHub (Oct 18, 2023): Other than the log message, is there any indication ollama isn't working as expected? The model gets unloaded after 5 minutes of inactivity to free up resources. The logs indicate this behaviour seems to be working albeit with an unexpected error message
Author
Owner

@UYousafzai commented on GitHub (Oct 19, 2023):

I checked through the code and I was trying to see if I can spot anything but given I barely had an hour to look at this so I couldn't really figure it out.

could you tell me where I can extend the time that has been set for freeing up resources, for the time being I am testing a couple of things and I am okay with resources being held indefinitely.

additionally if you would like to see some logs and you know where exactly they are stored let me know and I can produce them for your debugging purpose.

<!-- gh-comment-id:1770877272 --> @UYousafzai commented on GitHub (Oct 19, 2023): I checked through the code and I was trying to see if I can spot anything but given I barely had an hour to look at this so I couldn't really figure it out. could you tell me where I can extend the time that has been set for freeing up resources, for the time being I am testing a couple of things and I am okay with resources being held indefinitely. additionally if you would like to see some logs and you know where exactly they are stored let me know and I can produce them for your debugging purpose.
Author
Owner

@mxyng commented on GitHub (Oct 19, 2023):

The 5 minute timeout is not currently user configurable. If you want to keep it alive, you can periodically send an empty generate request. Something like this will work:

while :; do curl localhost:11434/api/generate -d '{"model":"<model>","system":"","prompt":"","template":""}'; sleep 60; done

There are plans on improving the scheduling and session time outs but not at this moment

<!-- gh-comment-id:1771354540 --> @mxyng commented on GitHub (Oct 19, 2023): The 5 minute timeout is not currently user configurable. If you want to keep it alive, you can periodically send an empty `generate` request. Something like this will work: ``` while :; do curl localhost:11434/api/generate -d '{"model":"<model>","system":"","prompt":"","template":""}'; sleep 60; done ``` There are plans on improving the scheduling and session time outs but not at this moment
Author
Owner

@abdinal1 commented on GitHub (Jan 21, 2024):

@mxyng
is it still the same? I have bíg model and i want to increase the timeout duration form e.g. 5 minutes to 10 minutes

<!-- gh-comment-id:1902721931 --> @abdinal1 commented on GitHub (Jan 21, 2024): @mxyng is it still the same? I have bíg model and i want to increase the timeout duration form e.g. 5 minutes to 10 minutes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#78078