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

Aberta Para iniciantes
#324 3 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
64/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
ollama, python
Domínio
backend

Direção de pesquisa

Comece em cptr/utils/ai.py e leia a função chat_completion, onde o issue identifica um timeout de 15 segundos de httpx.AsyncClient usado para tarefas utilitárias. Verifique como o projeto lê as variáveis de ambiente e como os timeouts de CPTR_STREAM_* são configurados. O trabalho está concluído quando as tarefas utilitárias puderem usar um timeout configurável e o caso de hardware lento do issue não falhar mais após 15 segundos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Python
Estrelas
768
Forks
108
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de open-webui/computer

Todas as issues de open-webui/computer

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.