-
-
Notifications
You must be signed in to change notification settings - Fork 857
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
[Bug]: Images Larger than a few hundred KBs fail to upload. #3349
Comments
Can agree, I can't upload any images to anything |
I suspect this may be docker related, I can upload large images fine on my (non-docker) instance. |
+1 |
I'm pretty sure the root cause it the same as the issue I've open here: LemmyNet/lemmy-ui#1532 Edit: you can set client_max_body at something like 5m in your nginx.conf to get a upper limit before it breaks |
This sounds exactly like the issue I'm having. |
@0xAnansi Huh, my nginx_internal.conf has it set at 20 megabytes. # Upload limit, relevant for pictrs
client_max_body_size 20M; EDIT: I see what you're saying. A lower limit than 20 is needed to ensure that the issue doesn't occur. EDIT 2: I tried 5M, but it still throws errors for images that are much smaller than that, such as 2.5MB. |
@EuphoricPenguin you need to set the limit on the external nginx config too. Here this is the external that rejects the request, and never sends it to the internal. |
Where is the external config file located? I couldn't see any more in the /srv/ directory. |
It's located in /etc/nginx/sites-available/ |
This one was already set at 10M, but I changed it and the internal one to 5M, and I'm still getting errors for smaller (2.5MB) images. Is this five megabits or five megabytes? EDIT: Now, images of any size cannot be uploaded. I let the Ansible playbook reset everything, and now things are somehow worse. Even a 2KB image fails to upload now, but the images that are already hosted render fine. |
Now I'm getting logs that look like this, and basically, all images are failing to upload. Any idea on what the issue might be? |
I figured out how to actually correctly edit the config files now thanks to this, and I'm also aware of changes to how front-end error handling works. Based on all of this and the fact that image uploading now supports sizable images, I consider my issue fully resolved. |
Requirements
Summary
Similar to #3173, I'm having an issue where larger images fail to upload. Unlike most of the other related issue threads I've seen, though, my issue only appears when an image larger than a few hundred kilobytes is uploaded, as anything around a megabyte or lower uploads without issue. This is extremely odd, as I'm currently sitting at around 15% disk utilization. I tried some of the solutions mentioned in #3173, including restarting that container, checking for 0KB snap files in particular folders, and ensuring my config files were set up correctly (I'm using the Ansible install). I couldn't find anything out of the ordinary other than perhaps my docker container indicating I'm running
asonix/pictrs:0.4.0-rc.7
, which appears to be a pre-release version of pictrs. Aside from that, I'm unsure what could be causing this issue. Not being able to upload images of even a fairly modest size breaks many of the use cases I had in mind for Lemmy; I don't see why images larger than that would be an issue.Steps to Reproduce
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
that appears as a result.Technical Details
The full log file is 12MB in size, which seems too large to post here all at once. Here's the snippet which I believe is relevant, but I'm not really sure what to make of it. It appears similar errors keep occurring, so I suspect this is related to the problem expressed above.
Version
BE: 0.18.0
Lemmy Instance URL
https://normalcity.life
The text was updated successfully, but these errors were encountered: