Comment by ~fr33p0rt on ~tsileo/microblog.pub
Thank you Alexey, I have a looked at discussion you linked and I tested both solutions. But it does not solve the issue. Only difference I see it crashes faster now.
Ticket created by ~fr33p0rt on ~tsileo/microblog.pub
I am running microblog.pub + Caddy based reverse proxy on virtual server with 1GB RAM. But if I upload image, e.g. full size 3744x5616 image from https://www.pexels.com/photo/selective-focus-photo-of-pile-of-assorted-title-books-1148399/ then I see
2023-01-22 14:34:27,014 INFO success: uvicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2023-01-22 14:35:35,421 INFO exited: uvicorn (terminated by SIGKILL; not expected) 2023-01-22 14:35:36,157 INFO spawned: 'uvicorn' with pid 25913 2023-01-22 14:35:37,159 INFO success: uvicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
No problem with smaller images, e.g. 1920x1080, or videos.
Possible solutions
- use different library or way to strip EXIF metadata
- resize image and strip EXIF metadata
- reject upload when size is bigger than ... and image has metadata
- ...