[GH-ISSUE #2612] Implement Check to Determine if Ollama is Already Running Before Starting New Instance (on Windows) #1539

Open
opened 2026-04-12 11:27:02 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @bannert1337 on GitHub (Feb 20, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2612

Originally assigned to: @dhiltgen on GitHub.

This feature request proposes the introduction of a pre-launch check for the Ollama application to ascertain if an instance of Ollama is already active. The primary goal is to enhance the application's usability and prevent potential conflicts or resource wastage by inadvertently running multiple instances when unnecessary. The check should encompass the following key functionalities:

  1. Detection Mechanism: Integrate a reliable mechanism to detect if an Ollama instance is currently running. This could involve checking for process IDs, leveraging lock files, or utilizing operating system-specific APIs to identify active instances of the application.

  2. User Prompt for Action: Upon detecting an active instance, the application should prompt the user with options on how to proceed. The prompt should include at least the following options:

    • Terminate the existing instance before starting a new one.
    • Allow the new instance to run alongside the existing instance (if supported by the application architecture).
    • Cancel the launch of the new instance.
  3. Configuration Settings: Provide users with configuration options (possibly in a settings file or through the application interface) to set their default behavior when an existing instance is detected. This setting would automate the response and could include options such as always replace, always run in parallel (if applicable), or always ask.

  4. Logging and Notifications: Implement logging to record instances where multiple runs are attempted and the actions taken. Additionally, provide clear notifications to the user about the detection of an existing instance and the outcome of their chosen action.

This feature aims to streamline the user experience, reduce confusion, and ensure that the application's behavior aligns with user expectations and system resource management best practices.

Originally created by @bannert1337 on GitHub (Feb 20, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2612 Originally assigned to: @dhiltgen on GitHub. This feature request proposes the introduction of a pre-launch check for the Ollama application to ascertain if an instance of Ollama is already active. The primary goal is to enhance the application's usability and prevent potential conflicts or resource wastage by inadvertently running multiple instances when unnecessary. The check should encompass the following key functionalities: 1. **Detection Mechanism**: Integrate a reliable mechanism to detect if an Ollama instance is currently running. This could involve checking for process IDs, leveraging lock files, or utilizing operating system-specific APIs to identify active instances of the application. 2. **User Prompt for Action**: Upon detecting an active instance, the application should prompt the user with options on how to proceed. The prompt should include at least the following options: - Terminate the existing instance before starting a new one. - Allow the new instance to run alongside the existing instance (if supported by the application architecture). - Cancel the launch of the new instance. 3. **Configuration Settings**: Provide users with configuration options (possibly in a settings file or through the application interface) to set their default behavior when an existing instance is detected. This setting would automate the response and could include options such as always replace, always run in parallel (if applicable), or always ask. 4. **Logging and Notifications**: Implement logging to record instances where multiple runs are attempted and the actions taken. Additionally, provide clear notifications to the user about the detection of an existing instance and the outcome of their chosen action. This feature aims to streamline the user experience, reduce confusion, and ensure that the application's behavior aligns with user expectations and system resource management best practices.
GiteaMirror added the feature request label 2026-04-12 11:27:02 -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#1539