ollama - ✅(Solved) Fix Model Selection Stuck On Loading [1 pull requests, 4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14723Fetched 2026-04-08 00:32:32
View on GitHub
Comments
4
Participants
3
Timeline
14
Reactions
0
Author
Timeline (top)
commented ×4mentioned ×4subscribed ×4cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #14725: fix: potential file descriptor leak in ListHandler

Description (problem / solution / changelog)

While investigating issue #14723, I noticed that ListHandler in server/routes.go uses defer f.Close() inside a loop. This can lead to a "too many open files" error or hanging when a user has many models, as the files aren't closed until the entire handler returns.

This PR wraps the manifest opening logic in a closure to ensure file descriptors are closed immediately after each iteration.

Changed files

RAW_BUFFERClick to expand / collapse

What is the issue?

Cannot select a model, ollama stays stuck on loading bar

<img width="252" height="57" alt="Image" src="https://github.com/user-attachments/assets/5d211ec1-a361-4982-91b3-afebfb1e12ff" />

Relevant log output

OS

macOS

GPU

AMD

CPU

AMD

Ollama version

0.17.7

extent analysis

Fix Plan

The fix involves updating the Ollama configuration to handle model selection properly. Here are the steps:

  • Check the Ollama version and update to the latest version if necessary.
  • Verify that the model files are correctly located and accessible.
  • Update the config.json file to include the correct model paths.

Example config.json update:

{
  "models": [
    {
      "name": "model1",
      "path": "/path/to/model1"
    },
    {
      "name": "model2",
      "path": "/path/to/model2"
    }
  ]
}
  • Restart the Ollama application to apply the changes.

Verification

To verify that the fix worked, try selecting a model again and check if the loading bar completes successfully.

Extra Tips

  • Ensure that the model files are compatible with the Ollama version being used.
  • Check the Ollama documentation for any specific configuration requirements for model selection.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING