[PR #1443] [CLOSED] fix: retry on concurrent request failure #21124

Closed
opened 2026-04-19 15:27:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1443
Author: @BruceMacD
Created: 12/9/2023
Status: Closed

Base: mainHead: brucemacd/concurrent-fail


📝 Commits (1)

  • e94e5b1 fix: retry on concurrent request failure

📊 Changes

1 file changed (+77 additions, -48 deletions)

View changed files

📝 llm/llama.go (+77 -48)

📄 Description

As of the most recent llama.cpp update concurrent requests had a race condition that would result in an empty response.

This was not easy to observe since the response from the llm runner subprocess was a 200 with the error {"content":"slot unavailable"} in the response stream, which just silently closed the channel.

This change resolves this by adding a retry on prediction. @dhiltgen this may be a case we need to account for in the cgo changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/1443 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 12/9/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `brucemacd/concurrent-fail` --- ### 📝 Commits (1) - [`e94e5b1`](https://github.com/ollama/ollama/commit/e94e5b1771df339ca3a43deb7a14ecc33aa92b63) fix: retry on concurrent request failure ### 📊 Changes **1 file changed** (+77 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `llm/llama.go` (+77 -48) </details> ### 📄 Description As of the most recent llama.cpp update concurrent requests had a race condition that would result in an empty response. This was not easy to observe since the response from the llm runner subprocess was a 200 with the error `{"content":"slot unavailable"}` in the response stream, which just silently closed the channel. This change resolves this by adding a retry on prediction. @dhiltgen this may be a case we need to account for in the cgo changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 15:27:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#21124