[GH-ISSUE #4623] The ollama server is stopped when I submitted jobs parallelly #2904

Closed
opened 2026-04-12 13:15:32 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @inoue0426 on GitHub (May 24, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4623

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

Hi,

When I submitted below, suddenly the server just shows POST and doesn't show HEAD and stop.
Do you know how to deal with this?

Python interface.

def run_test(t):
    subprocess.run(['./summary.sh', str(t)])
    
Parallel(n_jobs=-1)(delayed(run_test)(t) for t in tqdm(untested))

shell script

(torch) ➜  review git:(main) ✗ cat summary.sh 
#!/bin/zsh

output=$(./ollama-darwin run llama3:8b-instruct-q5_K_M \
  "Summarise below prompt. No explanation, just return summarized text. \
  INPUT TEXT: "${1}" ")

processed_output=$(echo "${output}" | tr -d ',' | tr '"' ',' | tr -d "'" | tr -d '\n')

echo "\"${1}\",\"${processed_output}\"" >> summary.csv%                                             (torch) ➜  review git:(main)

ollama server log

[GIN] 2024/05/24 - 17:09:06 | 200 |      20.916µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/05/24 - 17:09:06 | 200 |         363µs |       127.0.0.1 | POST     "/api/show"
[GIN] 2024/05/24 - 17:09:06 | 200 | 11.275035333s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:07 | 200 |      18.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/05/24 - 17:09:07 | 200 |     394.625µs |       127.0.0.1 | POST     "/api/show"
[GIN] 2024/05/24 - 17:09:07 | 200 | 10.529125125s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:07 | 200 |      20.333µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/05/24 - 17:09:07 | 200 |       441.5µs |       127.0.0.1 | POST     "/api/show"
[GIN] 2024/05/24 - 17:09:08 | 200 |   10.6834455s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:08 | 200 |      21.125µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/05/24 - 17:09:08 | 200 |     833.125µs |       127.0.0.1 | POST     "/api/show"
[GIN] 2024/05/24 - 17:09:09 | 200 | 10.325507834s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:11 | 200 | 10.764251375s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:12 | 200 | 10.599380292s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:14 | 200 | 10.261547416s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:15 | 200 |  9.766182917s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:16 | 200 | 10.306288125s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:17 | 200 | 10.834983416s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:19 | 200 |  12.06265875s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:20 | 200 | 12.753880667s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:20 | 200 | 12.012651375s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/05/24 - 17:09:54 | 200 |        18.5µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/05/24 - 17:09:54 | 200 |    2.248125ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2024/05/24 - 17:09:55 | 200 |  1.189454292s |       127.0.0.1 | POST     "/api/generate"

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.1.38

Originally created by @inoue0426 on GitHub (May 24, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4623 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? Hi, When I submitted below, suddenly the server just shows POST and doesn't show HEAD and stop. Do you know how to deal with this? ## Python interface. ```python def run_test(t): subprocess.run(['./summary.sh', str(t)]) Parallel(n_jobs=-1)(delayed(run_test)(t) for t in tqdm(untested)) ``` ## shell script ```sh (torch) ➜ review git:(main) ✗ cat summary.sh #!/bin/zsh output=$(./ollama-darwin run llama3:8b-instruct-q5_K_M \ "Summarise below prompt. No explanation, just return summarized text. \ INPUT TEXT: "${1}" ") processed_output=$(echo "${output}" | tr -d ',' | tr '"' ',' | tr -d "'" | tr -d '\n') echo "\"${1}\",\"${processed_output}\"" >> summary.csv% (torch) ➜ review git:(main) ✗ ``` ## ollama server log ``` [GIN] 2024/05/24 - 17:09:06 | 200 | 20.916µs | 127.0.0.1 | HEAD "/" [GIN] 2024/05/24 - 17:09:06 | 200 | 363µs | 127.0.0.1 | POST "/api/show" [GIN] 2024/05/24 - 17:09:06 | 200 | 11.275035333s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:07 | 200 | 18.917µs | 127.0.0.1 | HEAD "/" [GIN] 2024/05/24 - 17:09:07 | 200 | 394.625µs | 127.0.0.1 | POST "/api/show" [GIN] 2024/05/24 - 17:09:07 | 200 | 10.529125125s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:07 | 200 | 20.333µs | 127.0.0.1 | HEAD "/" [GIN] 2024/05/24 - 17:09:07 | 200 | 441.5µs | 127.0.0.1 | POST "/api/show" [GIN] 2024/05/24 - 17:09:08 | 200 | 10.6834455s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:08 | 200 | 21.125µs | 127.0.0.1 | HEAD "/" [GIN] 2024/05/24 - 17:09:08 | 200 | 833.125µs | 127.0.0.1 | POST "/api/show" [GIN] 2024/05/24 - 17:09:09 | 200 | 10.325507834s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:11 | 200 | 10.764251375s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:12 | 200 | 10.599380292s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:14 | 200 | 10.261547416s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:15 | 200 | 9.766182917s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:16 | 200 | 10.306288125s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:17 | 200 | 10.834983416s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:19 | 200 | 12.06265875s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:20 | 200 | 12.753880667s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:20 | 200 | 12.012651375s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/05/24 - 17:09:54 | 200 | 18.5µs | 127.0.0.1 | HEAD "/" [GIN] 2024/05/24 - 17:09:54 | 200 | 2.248125ms | 127.0.0.1 | POST "/api/show" [GIN] 2024/05/24 - 17:09:55 | 200 | 1.189454292s | 127.0.0.1 | POST "/api/generate" ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.1.38
GiteaMirror added the needs more info label 2026-04-12 13:15:32 -05:00
Author
Owner

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

Can you elaborate? When you say "ollama server is stopped" do you mean it crashed? If so, the server logs you included don't seem to show this.

Please upgrade to the latest version which now has concurrency enabled by default, so it should have better behavior for parallel requests. Hopefully that resolves your problem, but if not, please explain a bit more about how it is failing.

<!-- gh-comment-id:2251577899 --> @dhiltgen commented on GitHub (Jul 25, 2024): Can you elaborate? When you say "ollama server is stopped" do you mean it crashed? If so, the server logs you included don't seem to show this. Please upgrade to the latest version which now has concurrency enabled by default, so it should have better behavior for parallel requests. Hopefully that resolves your problem, but if not, please explain a bit more about how it is failing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2904