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

Aperta Adatta ai principianti
#324 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ollama, python
Ambito
backend

Direzione di ricerca

Inizia da cptr/utils/ai.py e leggi la funzione chat_completion, dove l’issue segnala un timeout di 15 secondi di httpx.AsyncClient usato per le attività di utilità. Controlla come il progetto legge le variabili d’ambiente e come sono configurati i timeout di CPTR_STREAM_*. Il lavoro è completato quando le attività di utilità possono usare un timeout configurabile e il caso di hardware lento descritto nell’issue non fallisce più dopo 15 secondi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
768
Fork
108
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di open-webui/computer

Tutte le issue di open-webui/computer

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.