bug: Utility tasks die at 15s because of hardcoded timeout — breaks slow hardware

Đang mở Phù hợp với người mới
#324 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đá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
64/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ollama, python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu tại cptr/utils/ai.py và đọc hàm chat_completion, nơi issue chỉ ra timeout 15 giây của httpx.AsyncClient được dùng cho các tác vụ tiện ích. Kiểm tra cách dự án đọc các biến môi trường và cách cấu hình timeout CPTR_STREAM_*. Công việc hoàn tất khi các tác vụ tiện ích có thể dùng timeout có thể cấu hình và trường hợp phần cứng chậm trong issue không còn thất bại sau 15 giây.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi,

I run slow hardware and have spent the day trying to get it to just churn tasks to read my code so i don't have to buy compute because the wife complains about money and AI. So I set up this computer/ollama/openwebui thing on my truenas goldeneye server and I love it but I hit timeout walls.

I see these timeout walls are hard coded so i change them manually and then i can churn AI compute like a man should. So then 1morning/10 grok dollars/ one wife went to town alone (sounds ok but its not).....anyway i have what i believe is a fix for sad slow hardware people who have a wife that will absolutely not let them upgrade hardware right now. So they can just let their old sad server cook with this fix. I want others to be able to run on slow hardware successfully without my pain so here it is:

The hardcoded timeout is in cptr/utils/ai.py inside the chat_completion function:async with httpx.AsyncClient(timeout=httpx.Timeout(15)) as client:This path is used for utility tasks (title generation, follow-ups, tags). The main streaming path respects the CPTR_STREAM_* timeouts. This one does not. Raising AIOHTTP_CLIENT_TIMEOUT and the Computer stream timeouts does not affect it.Confirmed fix: Change the 15 to a higher value (I used 14400) and make it persistent with a bind mount of the patched file. After that, utility tasks no longer die at 15 seconds and can complete successfully on slow hardware.Suggested upstream fix: Make this timeout configurable via an environment variable (e.g. CPTR_UTILITY_TIMEOUT) or reuse the existing stream timeout values so people on slower hardware can raise it without patching the container.

I hope this helps someone thanks.

-D

Ngôn ngữ chính
Python
Star
768
Fork
108
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của open-webui/computer

Tất cả issue của open-webui/computer

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.