aws-lambda-image
aws-lambda-image copied to clipboard
File too big???
I am finding that jpg file sizes greater than 5GB fail. The error I am getting is this:
Error: read ECONNRESET at errnoException (net.js:905:11) at Pipe.onread (net.js:559:19)
I have memory set to 1025 and timeout is 1:30. The job is only using:
Duration: 5531.38 ms Billed, Duration: 5600 ms Memory Size: 1024 MB, Max Memory Used: 160 MB
Does anyone know if there is a 5GB limit, and if so, is there a way to get around this?
I have the same problem. My image size is only 4.1MB.
I'm also seeing this issue
I have the same issue
Assuming you meant 5MB (not 5GB), I don't think the issue is with the file size. If it's similar to what I encountered (ECONNRESET), I replied with my answer on #31.
@odedniv I'm seeing it with images only a few MB in size. Replicating the problem was pretty easy for me, if I tried to process an image over 4 or 5 mb it would fail.
@cbdileo did you try removing the reduce section and using resize instead, the way I wrote in the other thread? It completely solved the problem for me and worked on more than a hundred images
@odedniv I have not, I ended up switching to another solution since I was under a time crunch
I looked at the other option and, not wanting to hurt any feelings, this one is much more advanced, and I already done some work on it that I didn't want to redo. I'm also not sure what the key difference there apart from the module they use to "hide" the use of the binaries. Maybe @slimfancy could shed some light on that.
Also, maybe the binaries here need updating? I tried an updated aws-sdk and it didn't fix the problem.
@odedniv I was in a similar situation. I tried to look through the code to see if I could spot something but time and my lack of node knowledge prevented any real progress.
@odedniv I'm NOT 100% percent sure the root cause of the problem. I think it's maybe caused by the binaries in bin/
which author used to reduce the file size. In my own project slimfancy/image-lambda, I change to use imagemin, then it works.
@ysugimoto any objection against switching to imagemin? Have you tried it before and it didn't meet your criteria?
@slimfancy I actually switched to your labmda function, so far it works great.