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

some files randomly won't get generated.

Open berkaytheunicorn opened this issue 7 years ago • 5 comments

Hi, moving the issue here from #161,

config

{
    "bucket": "untytled-test",
    "resizes": [
        {
            "size": 256,
            "suffix": "_sm",
            "quality": 90
        },
        {
            "size": "256x256^",
            "gravity": "Center",
            "crop": "256x256",
            "suffix": "_sm_sq",
            "quality": 90
        },
        {
            "size": 512,
            "suffix": "_md",
            "quality": 90
        },
        {
            "size": "512x512^",
            "gravity": "Center",
            "crop": "512x512",
            "suffix": "_md_sq",
            "quality": 90
        },
        {
            "size": 1024,
            "quality": 90,
            "suffix": "_lg"
        },
        {
            "size": "1024x1024^",
            "gravity": "Center",
            "crop": "1024x1024",
            "suffix": "_lg_sq",
            "quality": 90
        },
        {
            "size": 1440,
            "quality": 90,
            "suffix": "_xl"
        }
    ]
}

While resizing I can watch logs from CloudWatch and very randomly stops;

for example;

a 2560x1440 file stops at _lg a 3360x2100 file stops at _md_sq

berkaytheunicorn avatar Apr 04 '18 16:04 berkaytheunicorn

BTW, some files just resized perfectly.

berkaytheunicorn avatar Apr 04 '18 16:04 berkaytheunicorn

hmm partly my bad. some of them just timed out. I was set to 20 sec. (I don't know if it is normal though) but one of them gives this error

    "errorMessage": "Error processing logo-transparent.png: Error: Stream yields empty buffer"
}

file: logo-transparent

berkaytheunicorn avatar Apr 04 '18 16:04 berkaytheunicorn

on that file nothing generated.

berkaytheunicorn avatar Apr 04 '18 16:04 berkaytheunicorn

I suspect that once script gets an image from S3, all resize/reduce is processed on the fly so any processing binary buffers will be allocated on that process, then some resize/reduce process might not work unexpectedly.

Well, I'll plan to use temporary file while processing, but I'm not sure it solves the issue.

ysugimoto avatar Apr 04 '18 16:04 ysugimoto

For me on some png files it was the timeout, try increasing it.

jplarar avatar Jun 27 '18 16:06 jplarar