An error occurred while processing the request: terminated (When LLM response takes >5 min) #13581
Replies: 3 comments 3 replies
|
Thanks for the detailed logs, they might point to the cause.
This isn't a recursion/step limit either (12 tool calls is far below any, and that fails differently). To narrow the fix:
The most likely stall is a long-running tool call, not the model itself (token emission is typically fast). If a single MCP tool takes >5 min to return, that's the connection that gets dropped, which is why the MCP timeout/sseReadTimeout knobs above are the first thing to try. (For completeness: the LLM chat-stream has the same 5-min undici limit, but it's an unlikely culprit here since the model would normally emit tokens well within that window.) |
|
I have the same problem. I'm using LM Studio as LLM provider. |
|
So... Any settings to tweak and increase timeout? Or maybe other workaround? |
Uh oh!
There was an error while loading. Please reload this page.
What happened?
When my LLM backend spends a long time (seems to be over 5 minutes) processing a prompt without returning tokens, I get the following error in LibreChat:
Something went wrong. Here's the specific error message we encountered: An error occurred while processing the request: terminated
When the backend subsequently tries to reach out to LibreChat, this error appears in the backend's logs:
[Error] (HttpClient) CURL error: Failed writing received data to disk/application
[Error] (WrappedServer) Streaming request failed: CURL error: Failed writing received data to disk/application
[Info] (Process) srv stop: cancel task, id_task = 1830
These errors seem to be specific to LibreChat, as other frontends (OpenCode) do not have anything similar even with similarly long (or longer) processing times. I assume that LibreChat closes the connection if it doesn't receive a response from the LLM backend in a certain amount of time. I haven't found any information in the LibreChat docs on increasing the timeout via config.
Version Information
registry.librechat.ai/danny-avila/librechat-api:latest 73c23d345657
No special build args
Steps to Reproduce
What browsers are you seeing the problem on?
Firefox
Relevant log output
Screenshots
Code of Conduct
All reactions