[GH-ISSUE #6225] POST "/api/generate" retrun 500 #29650

Closed
opened 2026-04-22 08:42:24 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @w16645395520 on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6225

What is the issue?

I use the Qwen1.5-14B model
GGUF model file synthesized by llama.cpp
Ollama is installed directly locally in centos
ollama create qwen1.5_14b -f Modelfile
POST "/api/generate" when requesting
Errors are reported from time to time, and there is no error message
journalctl -u ollama --no-pager | grep "Aug 07 13:3"

...
Aug 07 13:30:28 chh-litb-sd-webui4 ollama[17408]: [GIN] 2024/08/07 - 13:30:28 | 200 | 1.788628934s | ip xxx | POST "/api/generate"
Aug 07 13:30:29 chh-litb-sd-webui4 ollama[17408]: [GIN] 2024/08/07 - 13:30:29 | 500 | 20.000781644s | ip xxx | POST "/api/generate"
Aug 07 13:30:41 chh-litb-sd-webui4 ollama[17408]: [GIN] 2024/08/07 - 13:30:41 | 200 | 1.56062356s | ip xxx | POST "/api/generate"
...

I don't know where else I can see more detailed error messages and show them to you

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.1.48

Originally created by @w16645395520 on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6225 ### What is the issue? I use the Qwen1.5-14B model GGUF model file synthesized by llama.cpp Ollama is installed directly locally in centos `ollama create qwen1.5_14b -f Modelfile` POST "/api/generate" when requesting Errors are reported from time to time, and there is no error message `journalctl -u ollama --no-pager | grep "Aug 07 13:3"` ``` ... Aug 07 13:30:28 chh-litb-sd-webui4 ollama[17408]: [GIN] 2024/08/07 - 13:30:28 | 200 | 1.788628934s | ip xxx | POST "/api/generate" Aug 07 13:30:29 chh-litb-sd-webui4 ollama[17408]: [GIN] 2024/08/07 - 13:30:29 | 500 | 20.000781644s | ip xxx | POST "/api/generate" Aug 07 13:30:41 chh-litb-sd-webui4 ollama[17408]: [GIN] 2024/08/07 - 13:30:41 | 200 | 1.56062356s | ip xxx | POST "/api/generate" ... ``` I don't know where else I can see more detailed error messages and show them to you ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.1.48
GiteaMirror added the bug label 2026-04-22 08:42:24 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 7, 2024):

Add Environment="OLLAMA_DEBUG=1" to /etc/systemd/system/ollama.service, restart ollama and add the logs when the error occurs.

<!-- gh-comment-id:2273048324 --> @rick-github commented on GitHub (Aug 7, 2024): Add `Environment="OLLAMA_DEBUG=1"` to /etc/systemd/system/ollama.service, restart ollama and add the logs when the error occurs.
Author
Owner

@w16645395520 commented on GitHub (Aug 8, 2024):

Add Environment="OLLAMA_DEBUG=1" to /etc/systemd/system/ollama.service, restart ollama and add the logs when the error occurs.

I added OLLAMA_DEBUG=1, and it did print out detailed log information, but there was no error information in it. I don’t know if there is a limit on the generation time. I observed several 500 requests and found that if the generation time is less than 20 seconds and there is no result returned, it will return 500.

<!-- gh-comment-id:2274807132 --> @w16645395520 commented on GitHub (Aug 8, 2024): > Add `Environment="OLLAMA_DEBUG=1"` to /etc/systemd/system/ollama.service, restart ollama and add the logs when the error occurs. I added `OLLAMA_DEBUG=1`, and it did print out detailed log information, but there was no error information in it. I don’t know if there is a limit on the generation time. I observed several 500 requests and found that if the generation time is less than 20 seconds and there is no result returned, it will return 500.
Author
Owner

@w16645395520 commented on GitHub (Aug 9, 2024):

Wrong, it is more than 20s

<!-- gh-comment-id:2277002445 --> @w16645395520 commented on GitHub (Aug 9, 2024): Wrong, it is more than 20s
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#29650