[BUG]: wait_for_ollama() Retries Indefinitely When Ollama Is Unavailable
Maintainer thường phản hồi trong vòng 1 ngày
@SYED-IRTEZA-HUSSAIN-RIZVI đang làm issue này rồi.
Từ ngày 9/11/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu trong bot.py tại wait_for_ollama() và theo dõi cách trình xử lý sự kiện on_ready() xử lý các lỗi và giá trị trả về của hàm này. Thêm thời gian chờ có giới hạn cùng cách xử lý lỗi phù hợp, sau đó xác minh rằng quá trình khởi động có thể tiếp tục hoặc báo cáo dịch vụ Ollama không khả dụng khi đạt đến giới hạn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 11
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AOSSIE-Org/SkillBot
-
[BUG]: Issue-creation intent is missed when the article is omitted (create issue for this)Có thể đã có người làm @Ankitavasudev đã nhận 8 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
AOSSIE-Org/SkillBot#65 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: Non-Atomic Gap Log Writes Can Cause Data Loss After an Interrupted SaveCó thể làm lại được @SYED-IRTEZA-HUSSAIN-RIZVI đã nhận 11 ngày trước và không có pull request nào đang mở. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AOSSIE-Org/SkillBot#61 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: os.chdir() Changes the Process-Wide Working Directory During Repository SyncCó thể đã có người làm @aadityachhipa80-oss đã nhận 2 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
AOSSIE-Org/SkillBot#59 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: Backlog Messages Are Re-processed on Discord ReconnectionCó thể làm lại được @SYED-IRTEZA-HUSSAIN-RIZVI đã nhận 11 ngày trước và không có pull request nào đang mở. Đang mởbug enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
AOSSIE-Org/SkillBot#58 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: _log_gap() Performs Blocking File I/O on the Async Event LoopCó thể đã có người làm @abu-tahir-0 đã nhận 13 ngày trước. Đang mởbug enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
AOSSIE-Org/SkillBot#57 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AOSSIE-Org/SkillBot
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gke-labs/kube-agents#6778 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Declare the CMS schema library in the optional recipients extraCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea:python in-progress
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
yhay81/pyropdf#1005 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/build-framework kind/enhancement priority/low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
yugabyte/yugabyte-db#38826 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
sususweet/midea_auto_cloud#306 ·
Maintainer thường phản hồi trong vòng 9 ngày