[GH-ISSUE #3033] Uploading a 'big' document #1939

Closed
opened 2026-02-22 18:27:20 -05:00 by yindo · 2 comments
Owner

Originally created by @ronald888 on GitHub (Jan 26, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3033

I have a docker based install running on an AWS EC2 instance - c4.4xlarge.
For some reason, I can't load a PDF file that's greater than 1 MB in size.

Image

The upload process just continues 'forever'.
If I try the same PDF in the anythingllm cloud, it works and loads within 2 seconds.

I'm starting the docker container as:

IMAGE=mintplexlabs/anythingllm@sha256:228b3e219e4b2bf906d0a8973f3546e0bf0ed665e71b5bbc93dd24f8d9d89eee

sudo docker run -d --restart always --name anythingllm -p 3001:3001 --cap-add SYS_ADMIN -v /home/ec2-user/anythingllm:/app/server/storage -v /home/ec2-user/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" $IMAGE

Should I use a different image? Should I use a different EC2 instance type?

Hope to get inputs on this.

Thanks

Originally created by @ronald888 on GitHub (Jan 26, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3033 I have a docker based install running on an AWS EC2 instance - c4.4xlarge. For some reason, I can't load a PDF file that's greater than 1 MB in size. <img width="482" alt="Image" src="https://github.com/user-attachments/assets/674e0893-af3e-4cd7-a46a-61bf1b2b6718" /> The upload process just continues 'forever'. If I try the same PDF in the anythingllm cloud, it works and loads within 2 seconds. I'm starting the docker container as: ``` IMAGE=mintplexlabs/anythingllm@sha256:228b3e219e4b2bf906d0a8973f3546e0bf0ed665e71b5bbc93dd24f8d9d89eee sudo docker run -d --restart always --name anythingllm -p 3001:3001 --cap-add SYS_ADMIN -v /home/ec2-user/anythingllm:/app/server/storage -v /home/ec2-user/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" $IMAGE ``` Should I use a different image? Should I use a different EC2 instance type? Hope to get inputs on this. Thanks
yindo closed this issue 2026-02-22 18:27:20 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 27, 2025):

What do the collector logs say? You can certainly upload larger than 1MB documents so it would appear they are being dropped by some middleware or something. Are you running NGINX in front of the server? If so the default client_max_body_size is also, coincidentally, 1MB - so it would never reach the backend.

99% chance this is the issue for your setup. Plenty of resources on that instance and we dont impose an upload limit.

server {
    client_max_body_size 10M; // or whatever you like
}

LMK if this is not the case, but closing until since this is a user config/setup issue if that hunch is correct.

@timothycarambat commented on GitHub (Jan 27, 2025): What do the `collector` logs say? You can certainly upload larger than 1MB documents so it would appear they are being dropped by some middleware or something. Are you running NGINX in front of the server? If so the default `client_max_body_size` is also, coincidentally, 1MB - so it would never reach the backend. 99% chance this is the issue for your setup. Plenty of resources on that instance and we dont impose an upload limit. ``` server { client_max_body_size 10M; // or whatever you like } ``` LMK if this is **not** the case, but closing until since this is a user config/setup issue if that hunch is correct.
Author
Owner

@ronald888 commented on GitHub (Jan 27, 2025):

Thank you for pointing me in the right direction. This addressed the problem.

@ronald888 commented on GitHub (Jan 27, 2025): Thank you for pointing me in the right direction. This addressed the problem.
yindo changed title from Uploading a 'big' document to [GH-ISSUE #3033] Uploading a 'big' document 2026-06-05 14:43:35 -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#1939