[PR #15657] app/server: fix desktop app startup killing active ollama launch sessions #25740

Open
opened 2026-04-19 18:25:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15657
Author: @hoyyeva
Created: 4/17/2026
Status: 🔄 Open

Base: mainHead: hoyyeva/fix-launch-app-process-reap


📝 Commits (1)

  • 8c7f95d app/server: fix desktop app startup killing active ollama launch sessions

📊 Changes

4 files changed (+138 additions, -2 deletions)

View changed files

📝 app/server/server.go (+53 -0)
📝 app/server/server_test.go (+33 -0)
📝 app/server/server_unix.go (+20 -1)
📝 app/server/server_windows.go (+32 -1)

📄 Description

Fix desktop app startup killing active ollama launch sessions.

When the desktop app starts, it launches a managed ollama serve. If another Ollama server is already running, that managed server can exit with a port conflict. Previously, the app treated that as a stale/conflicting process and called reapServers(), which killed all other processes named ollama. This caused the active integration session to terminate when the user opened the desktop app.

This change updates the desktop server startup flow to:

  • Check whether an existing Ollama server is healthy before reaping processes.
  • Wait briefly for an already-starting server to become healthy.
  • Adopt the existing healthy server instead of killing it.
  • Narrow reapServers() on macOS and Windows so it only targets ollama serve processes, not other Ollama CLI commands.
  • This preserves ollama launch <integration> sessions when the desktop app is opened afterward.

🔄 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/15657 **Author:** [@hoyyeva](https://github.com/hoyyeva) **Created:** 4/17/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `hoyyeva/fix-launch-app-process-reap` --- ### 📝 Commits (1) - [`8c7f95d`](https://github.com/ollama/ollama/commit/8c7f95d82f7a1882f1922f9442c19b2242f38dd8) app/server: fix desktop app startup killing active ollama launch sessions ### 📊 Changes **4 files changed** (+138 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `app/server/server.go` (+53 -0) 📝 `app/server/server_test.go` (+33 -0) 📝 `app/server/server_unix.go` (+20 -1) 📝 `app/server/server_windows.go` (+32 -1) </details> ### 📄 Description Fix desktop app startup killing active ollama launch sessions. When the desktop app starts, it launches a managed ollama serve. If another Ollama server is already running, that managed server can exit with a port conflict. Previously, the app treated that as a stale/conflicting process and called reapServers(), which killed all other processes named ollama. This caused the active integration session to terminate when the user opened the desktop app. This change updates the desktop server startup flow to: - Check whether an existing Ollama server is healthy before reaping processes. - Wait briefly for an already-starting server to become healthy. - Adopt the existing healthy server instead of killing it. - Narrow reapServers() on macOS and Windows so it only targets ollama serve processes, not other Ollama CLI commands. - This preserves `ollama launch <integration>` sessions when the desktop app is opened afterward. --- <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 18:25:22 -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#25740