aws-lambda-image icon indicating copy to clipboard operation
aws-lambda-image copied to clipboard

File too big???

Open brownell opened this issue 9 years ago • 12 comments

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?

brownell avatar Feb 16 '16 15:02 brownell

I have the same problem. My image size is only 4.1MB.

leonfancy avatar Apr 29 '16 05:04 leonfancy

I'm also seeing this issue

cbdileo avatar Sep 15 '16 18:09 cbdileo

I have the same issue

maennchen avatar Sep 27 '16 10:09 maennchen

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 avatar Nov 07 '16 07:11 odedniv

@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 avatar Nov 07 '16 14:11 cbdileo

@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 avatar Nov 07 '16 15:11 odedniv

@odedniv I have not, I ended up switching to another solution since I was under a time crunch

cbdileo avatar Nov 07 '16 17:11 cbdileo

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 avatar Nov 07 '16 18:11 odedniv

@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.

cbdileo avatar Nov 07 '16 18:11 cbdileo

@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.

leonfancy avatar Nov 09 '16 07:11 leonfancy

@ysugimoto any objection against switching to imagemin? Have you tried it before and it didn't meet your criteria?

odedniv avatar Nov 09 '16 08:11 odedniv

@slimfancy I actually switched to your labmda function, so far it works great.

cbdileo avatar Nov 09 '16 19:11 cbdileo