[PR #10317] [MERGED] server/internal/client/ollama: handle some network errors gracefully #13210

Closed
opened 2026-04-13 00:20:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10317
Author: @bmizerany
Created: 4/17/2025
Status: Merged
Merged: 4/17/2025
Merged by: @bmizerany

Base: mainHead: bmizerany/client2readtimeout


📝 Commits (1)

  • 77d910b server/internal/client/ollama: handle some network errors gracefully

📊 Changes

4 files changed (+115 additions, -16 deletions)

View changed files

📝 server/internal/client/ollama/registry.go (+41 -11)
server/internal/client/ollama/registry_synctest_test.go (+51 -0)
📝 server/internal/client/ollama/registry_test.go (+2 -2)
📝 server/internal/registry/server.go (+21 -3)

📄 Description

In some cases, the client may encounter network errors that are
temporary in nature, such as connection resets or timeouts. In these
cases, the client should retry the operation instead of failing
immediately.

Hopefully this helps users who are experiencing intermittent network
errors in the middle of large downloads, causing it to fail, possible
unnoticed by the user for some time; time that could be spent resuming
the download on their behalf.

This also updates the DefaultRegistry docs to mention the new
ReadTimeout field, which it sets to 30 seconds.

Also, remove old mention of removed ChunkingDirectory field.


🔄 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/10317 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 4/17/2025 **Status:** ✅ Merged **Merged:** 4/17/2025 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/client2readtimeout` --- ### 📝 Commits (1) - [`77d910b`](https://github.com/ollama/ollama/commit/77d910bf921f1909f51253e6e3d4becad399c497) server/internal/client/ollama: handle some network errors gracefully ### 📊 Changes **4 files changed** (+115 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `server/internal/client/ollama/registry.go` (+41 -11) ➕ `server/internal/client/ollama/registry_synctest_test.go` (+51 -0) 📝 `server/internal/client/ollama/registry_test.go` (+2 -2) 📝 `server/internal/registry/server.go` (+21 -3) </details> ### 📄 Description In some cases, the client may encounter network errors that are temporary in nature, such as connection resets or timeouts. In these cases, the client should retry the operation instead of failing immediately. Hopefully this helps users who are experiencing intermittent network errors in the middle of large downloads, causing it to fail, possible unnoticed by the user for some time; time that could be spent resuming the download on their behalf. This also updates the DefaultRegistry docs to mention the new ReadTimeout field, which it sets to 30 seconds. Also, remove old mention of removed ChunkingDirectory field. --- <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-13 00:20:59 -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#13210