Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request failed during generation: Server error: error trying to connect: Connection refused (os error 111) #1407

Open
calycekr opened this issue Aug 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@calycekr
Copy link

Bug description

The error occurs when the LLM Server suddenly stops, and the chat-ui continues to send queries to the LLM Server, eventually leading to the chat-ui also crashing. The specific error message is:

Error: Request failed during generation: Server error: error trying to connect: Connection refused (os error 111)

Steps to reproduce

  1. Ensure the LLM Server is running.
  2. Start the chat-ui and begin sending queries to the LLM Server.
  3. Suddenly stop the LLM Server.
  4. Continue to send queries from the chat-ui to the LLM Server.
  5. Observe the error and subsequent crash of the chat-ui.

Context

Logs

file:///app/chat-ui/node_modules/@huggingface/inference/dist/index.js:371
            throw new Error(data.error);
                  ^

Error: Request failed during generation: Server error: error trying to connect: Connection refused (os error 111)
    at streamingRequest (file:///app/chat-ui/node_modules/@huggingface/inference/dist/index.js:371:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async textGenerationStream (file:///app/chat-ui/node_modules/@huggingface/inference/dist/index.js:705:3)
    at async generate (file:///app/chat-ui/build/server/chunks/_server.ts-82ba0bdc.js:558:20)
    at async textGenerationWithoutTitle (file:///app/chat-ui/build/server/chunks/_server.ts-82ba0bdc.js:850:5)

Notes

The chat-ui should handle the LLM Server shutdown gracefully and not crash. Implementing a retry mechanism or proper error handling could help mitigate this issue.

@calycekr calycekr added the bug Something isn't working label Aug 13, 2024
@nsarrazin
Copy link
Collaborator

I can't reproduce this issue using the TGI endpoint, can you tell me which endpoint/config you were using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants