-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Question]: Running the agent, first conversation returns error message and the next conversation directly return #7897
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
Comments
The timeout errors you’re seeing with the "invoke" component indicate that the remote server at The "invoke" component is designed to make HTTP requests to remote endpoints and has a configurable Other parts of RAGFlow, such as the LLM chat model, implement retry logic with exponential backoff for transient errors (including timeouts and server errors). This approach retries failed requests a set number of times, waiting longer between each attempt, which can help mitigate temporary network or server issues [source]. To improve resilience against timeouts in the "invoke" component, consider implementing a similar retry mechanism. You can refer to the retry logic in the LLM chat model as a template. Alternatively, if the remote service supports asynchronous processing, you could adapt the call pattern to poll for results or use a task queue with retries, as seen in the In summary:
There are no existing issues or discussions in the repository that address this specific problem. If you need guidance on how to implement retry logic similar to the LLM chat model, let me know! To reply, just mention my name @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
What other options do we have here? And are you planning to build in retries for the invoke component down the line? |
Currently, there are no documented plans or existing discussions in the RAGFlow repository about adding retries to the "invoke" component. The component only supports a configurable timeout, and if the remote service does not respond within that period, it returns an error without retrying. This is different from other parts of RAGFlow, like the LLM chat model, which already implement retry logic with exponential backoff for transient errors. Beyond implementing retries, your options are to investigate and optimize the remote service at If you need guidance on how to implement retry logic similar to the LLM chat model, let me know. At this time, there is no indication that retries for the "invoke" component are planned or in progress in the official project sources. To reply, just mention my name @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
@dosu |
There isn’t currently a built-in mechanism in RAGFlow to prevent errors from components like "invoke" from being passed back to users in follow-up conversations. When a component fails (for example, due to a timeout), the error is returned as the response and stored in the conversation history. This means that unless the error is handled or filtered out, it will continue to appear in subsequent conversation rounds, as you’ve observed. To avoid this, you can adapt error handling patterns used elsewhere in RAGFlow. For example, components like To prevent errors from being passed to users in follow-up conversations, you could:
For inspiration, see how error handling is done in other components like If you need a concrete code example or guidance on where to add these changes, let me know! To reply, just mention my name @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Self Checks
Describe your problem
When running the agent, during the first conversation, if the "invoke" component call times out, it returns the message:
ERROR: HTTPConnectionPool(host='172.31.7.174', port=8080): Read timed out. (read timeout=5)
If you continue the conversation, the second response directly returns:
{'content': {'0': "HTTPConnectionPool(host='172.31.7.174', port=8080): Read timed out. (read timeout=5)"}
And in the third round of conversation, it again returns:
ERROR: HTTPConnectionPool(host='172.31.7.174', port=8080): Read timed out. (read timeout=5)
We tried increasing the invoke timeout to 60 seconds since we're unsure how long the API might take, but this issue can still occur.
Do you have any suggestions on how to fix this?
Here's what the three conversation steps look like in the image
The text was updated successfully, but these errors were encountered: