Hi Opalstack Support - I'll preface this with the fact that I'm a noob and not nearly qualified to be messing with stuff, but I wanted to give it my best shot before turning to Support for help. I apologize for the long post but I'm including a lot of details to help walk through my process, findings, and to explain why I finally gave up and bothered y'all.
I'm having a problem uploading animated gifs and videos to my Mastodon instance at https://hoosier.social. Jpegs, PNGs, and other still images work just fine regardless of file size. You can see some of my testing at: https://hoosier.social/@hoosiersocial. Two different errors/scenarios below.
Error #1: When I try uploading a very small animated gif (I've tried as small as 51KB) I get an error. The Mastodon UI error says "500 Error processing thumbnail for uploaded media." Example log file entries that might be related to this:
nginx_access.log
<IP Address Removed> - - [26/Dec/2022:20:45:05 +0000] "POST /api/v2/media HTTP/1.1" 500 68 "https://hoosier.social/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54"
nginx_error.log
2022/12/26 20:45:04 [error] 234113#234113: *74577 connect() to unix://home/brianrlawson/apps/hoosiersocial/mastodon/tmp/sockets/streaming.sock failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: hoosier.social, request: "GET /api/v1/streaming/? HTTP/1.1", upstream: "http://unix://home/brianrlawson/apps/hoosiersocial/mastodon/tmp/sockets/streaming.sock:/api/v1/streaming/?", host: "hoosier.social"
I think that the problem here is with a service not starting up. When I do a restart, I'll get a message saying "streaming: ERROR (spawn error)" in the SSH console. The streaming.log says "ERR! Could not start server, the port or socket is in use."
Error #2: Maybe related, or maybe something different, is a 413 error I get when trying to upload a larger gif/video file (e.g., 2MB).
The Mastodon UI error message simply says "413"...that's all. Example log file entries that might be related to this:
nginx_access.log
<IP Address Removed> - - [26/Dec/2022:20:59:20 +0000] "POST /api/v2/media HTTP/1.1" 413 585 "https://hoosier.social/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54"
nginx_error.log
2022/12/26 20:59:20 [error] 234113#234113: *75297 client intended to send too large body: 2035024 bytes, client: 127.0.0.1, server: hoosier.social, request: "POST /api/v2/media HTTP/1.1", host: "hoosier.social", referrer: "https://hoosier.social/"
This entry is interesting because it says "client intended to send too large body" I did some Googling for how to fix this and can confirm that my mastodon/app/models/media_attachment.rb has IMAGE_LIMIT=10.megabytes. Also, I followed advice from https://www.tecmint.com/limit-file-upload-size-in-nginx/ and edited the nginx.conf file. I set client_max_body_size 40M; in the "http {" section and restarted. It didn't work, so I went back in to that file and commented that back out and restarted again, which is how it sits now. Editing these files started to push beyond my comfort limits, so I decided to reach out and ask for help from the experts. Again, sorry for the long.
Thanks,
Brian