[BUG]: wait_for_ollama() Retries Indefinitely When Ollama Is Unavailable
Los mantenedores suelen responder en 1 día
@SYED-IRTEZA-HUSSAIN-RIZVI ya está trabajando en esto.
Desde el 9/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Empieza en bot.py, en wait_for_ollama(), y sigue cómo el controlador de eventos on_ready() gestiona sus errores y su valor de retorno. Añade una espera con límite de tiempo y una gestión de errores adecuada; después, verifica que el inicio pueda continuar o informar de que el servicio Ollama no está disponible cuando se alcance el límite.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
The wait_for_ollama() function in bot.py contains an unconditional while True loop that continuously checks whether the Ollama service is available.
When Ollama is unavailable, unreachable, or fails to return a successful response, the function catches the request error, waits for 10 seconds, and retries again. However, there is no maximum retry count or overall timeout to stop this process.
Since wait_for_ollama() is called from the Discord bot's on_ready() event handler, the bot's readiness workflow can remain blocked indefinitely while Ollama is unavailable.
As a result, subsequent operations within on_ready(), including the backlog scan, cannot execute until Ollama becomes reachable. The same behavior can occur during Discord reconnections because on_ready() is invoked again after a connection is re-established.
The function currently lacks a defined timeout, retry limit, or failure-handling mechanism for prolonged Ollama unavailability.
Steps to Reproduce
- Ensure that the SkillBot project dependencies are installed and the bot is configured correctly.
- Stop the local Ollama service running on port
11434. - Start the SkillBot application while Ollama remains unavailable.
- Allow the bot to execute the
wait_for_ollama()function during its startup process. - Observe the application logs for Ollama connection retry messages.
- Keep the Ollama service stopped and observe that the function continues retrying every 10 seconds.
- Verify that the function does not terminate after a defined number of attempts or a maximum waiting duration.
Expected Result:
The function should stop retrying after a configurable timeout or maximum number of attempts and handle Ollama unavailability gracefully.
Actual Result:
The function continues retrying every 10 seconds indefinitely while Ollama remains unavailable.
Logs and Screenshots
No response
Environment Details
Operating System: Windows 11
Programming Language: Python 3.11.3
Application: SkillBot (Discord Bot)
Discord Library: discord.py 2.7.1
LLM Runtime: Ollama (Local)
Ollama API Endpoint: http://localhost:11434/
Affected File: bot.py
Affected Function: wait_for_ollama()
Affected Workflow: Bot startup and Discord reconnection
Retry Interval: 10 seconds
Impact
High - Major feature is broken
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Lenguaje dominante
- Python
- Estrellas
- 10
- Forks
- 11
- Merge medio
- 6 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AOSSIE-Org/SkillBot
-
[BUG]: Issue-creation intent is missed when the article is omitted (create issue for this)Posiblemente ocupada @Ankitavasudev la tomó hace 8 días. Abiertobug enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
AOSSIE-Org/SkillBot#65 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Non-Atomic Gap Log Writes Can Cause Data Loss After an Interrupted SaveQuizá libre de nuevo @SYED-IRTEZA-HUSSAIN-RIZVI la tomó hace 11 días y no hay ningún pull request abierto. Abiertobug enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
AOSSIE-Org/SkillBot#61 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG]: os.chdir() Changes the Process-Wide Working Directory During Repository SyncPosiblemente ocupada @aadityachhipa80-oss la tomó hace 2 días. Abiertobug enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
AOSSIE-Org/SkillBot#59 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Backlog Messages Are Re-processed on Discord ReconnectionQuizá libre de nuevo @SYED-IRTEZA-HUSSAIN-RIZVI la tomó hace 11 días y no hay ningún pull request abierto. Abiertobug enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
AOSSIE-Org/SkillBot#58 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG]: _log_gap() Performs Blocking File I/O on the Async Event LoopPosiblemente ocupada @abu-tahir-0 la tomó hace 13 días. Abiertobug enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
AOSSIE-Org/SkillBot#57 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de AOSSIE-Org/SkillBot
Issues similares
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
gke-labs/kube-agents#6778 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Declare the CMS schema library in the optional recipients extraPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea:python in-progress
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
yhay81/pyropdf#1005 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
area/build-framework kind/enhancement priority/low
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
yugabyte/yugabyte-db#38826 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
sususweet/midea_auto_cloud#306 ·
Los mantenedores suelen responder en 9 días