[GH-ISSUE #3235] [BUG]: “Could not respond to message. An error occurred while streaming response. network error” when documents used #2082

Closed
opened 2026-02-22 18:28:05 -05:00 by yindo · 3 comments
Owner

Originally created by @ctcanbol on GitHub (Feb 16, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3235

How are you running AnythingLLM?

Docker (remote machine)

What happened?

I am using the latest version of AnythingLLM on Ubuntu 22.04 with Docker. The LLM Model is Deepseek-r1:8b. I have one very short and simple txt file attached to the workspace. I tried with both LanceDB and ChromaDB and I get the “An error occurred while streaming response. network error” error 4 out of 5 times. The dev console has the following error “POST /api/workspace/knowledge-base/thread/87298c23-56fa-41fa-9963-4a7cc978d3fa/stream-chat net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)”.

The interesting thing is that the response actually comes after a while. When I refresh the page, I see that the response has returned, and the error disappeared. I haven't found a solution to this yet, but it prevents us from using documents in the workspace.

Are there known steps to reproduce?

I can reproduce the issue on my environment.

Originally created by @ctcanbol on GitHub (Feb 16, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3235 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? I am using the latest version of AnythingLLM on Ubuntu 22.04 with Docker. The LLM Model is Deepseek-r1:8b. I have one very short and simple txt file attached to the workspace. I tried with both LanceDB and ChromaDB and I get the “An error occurred while streaming response. network error” error 4 out of 5 times. The dev console has the following error “POST /api/workspace/knowledge-base/thread/87298c23-56fa-41fa-9963-4a7cc978d3fa/stream-chat net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)”. The interesting thing is that the response actually comes after a while. When I refresh the page, I see that the response has returned, and the error disappeared. I haven't found a solution to this yet, but it prevents us from using documents in the workspace. ### Are there known steps to reproduce? I can reproduce the issue on my environment.
yindo added the possible bug label 2026-02-22 18:28:05 -05:00
yindo closed this issue 2026-02-22 18:28:05 -05:00
Author
Owner

@timothycarambat commented on GitHub (Feb 16, 2025):

Docker (remote machine)

How are you running the web interface? NGINX or connecting directly over IP and HTTP? The issue likely lies in the server block settings since incomplete chunk encodings would likely be related to web server/ reverse-proxy settings.

Commonly this is what you need

location / {
      # Prevent timeouts on long-running requests.
      proxy_connect_timeout       605;
      proxy_send_timeout          605;
      proxy_read_timeout          605;
      send_timeout                605;
      keepalive_timeout           605;

      # Enable readable HTTP Streaming for LLM streamed responses
      # not having this would cause incomplete chunk responses
      proxy_buffering off; 
      proxy_cache off;

      # Proxy your locally running service
      proxy_pass  http://0.0.0.0:3001;
    }

https://stackoverflow.com/questions/29789268/neterr-incomplete-chunked-encoding-nginx

If this is not the case, let me know, but this is a pretty common "gotcha" with streaming via reverse-proxy

@timothycarambat commented on GitHub (Feb 16, 2025): > Docker (remote machine) How are you running the web interface? NGINX or connecting directly over IP and HTTP? The issue likely lies in the server block settings since incomplete chunk encodings would likely be related to web server/ reverse-proxy settings. Commonly this is what you need ``` location / { # Prevent timeouts on long-running requests. proxy_connect_timeout 605; proxy_send_timeout 605; proxy_read_timeout 605; send_timeout 605; keepalive_timeout 605; # Enable readable HTTP Streaming for LLM streamed responses # not having this would cause incomplete chunk responses proxy_buffering off; proxy_cache off; # Proxy your locally running service proxy_pass http://0.0.0.0:3001; } ``` https://stackoverflow.com/questions/29789268/neterr-incomplete-chunked-encoding-nginx If this is not the case, let me know, but this is a pretty common "gotcha" with streaming via reverse-proxy
Author
Owner

@ctcanbol commented on GitHub (Feb 17, 2025):

You're exactly right, I never thought it could be nginx for some reason. The nginx configuration solved the problem. Anyway, thanks for the help!

@ctcanbol commented on GitHub (Feb 17, 2025): You're exactly right, I never thought it could be nginx for some reason. The nginx configuration solved the problem. Anyway, thanks for the help!
Author
Owner

@timothycarambat commented on GitHub (Feb 17, 2025):

I fought the same thing for a while a long time ago - glad that experience was helpful to someone else

@timothycarambat commented on GitHub (Feb 17, 2025): I fought the same thing for a while a long time ago - glad that experience was helpful to someone else
yindo changed title from [BUG]: “Could not respond to message. An error occurred while streaming response. network error” when documents used to [GH-ISSUE #3235] [BUG]: “Could not respond to message. An error occurred while streaming response. network error” when documents used 2026-06-05 14:44:26 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2082