Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write EPIPE error #199

Open
kd-biztrology opened this issue Jan 8, 2020 · 5 comments
Open

write EPIPE error #199

kd-biztrology opened this issue Jan 8, 2020 · 5 comments

Comments

@kd-biztrology
Copy link

{
"errorType": "Error",
"errorMessage": "write EPIPE",
"trace": [
"Error: write EPIPE",
" at WriteWrap.afterWrite [as oncomplete] (net.js:789:14)"
]
}

my image is 12M have this error,

@schmoove
Copy link

schmoove commented Apr 30, 2020

I would recommend doing a full install with the new 10.x runtime and dedicated layer.

Had a number of issues with this today, and a full reinstall got it working for me.

@glassdimlygr
Copy link

glassdimlygr commented Aug 3, 2020

I installed from scratch and the latest and I'm getting this error for pngs and jpgs with this config, images are around 400KB. gifs work fine:

{
    "bucket": "mybucket",
    "backup": {
        "directory": "./original"
    },
    "keepExtension": true,
    "reduce": {
        "directory": "./reduced",
        "quality": 70,
        "acl": "public-read"
    },
    "optimizers": {
        "pngquant": ["--speed=1", "--quality=60-90"],
        "mozjpeg": ["-optimize", "-progressive", "-quality 70"],
        "gifsicle": ["-O3"]
    }
}

@glassdimlygr
Copy link

glassdimlygr commented Aug 3, 2020

My issue here was the following line:
"mozjpeg": ["-optimize", "-progressive", "-quality 70"],
Specifically, "-quality 70". Likewise, "-quality=70" didn't work.
This worked:
"mozjpeg": ["-optimize", "-progressive"],

This seems a little odd to me seeing as I can test on my cli like so:

/usr/local/Cellar/mozjpeg/3.3.1_1/bin/cjpeg -optimize -progressive -quality 70  ./gorilla.jpg > gorilla-opt.jpg

But I guess quality is being set above in the reduce stanza, so perhaps that's why.

@jshow
Copy link

jshow commented Jan 19, 2021

I'm seeing the same symptom. Using tagged v1.1(aws-lambda-image-with-dedicated-layer), replicable with any jpeg (4mb largest file). Occurs whenever a reduce config is provided. It feels like the binaries are not installed to reduce? When the reduce config is removed resizes work as expected

  "reduce": { 
    "directory": "downloads/",
    "suffix": "_sixty_percent",
    "quality":90
  },

I've experimented with different optimizer options (as recommended here) without a positive effect

  "optimizers": {
    "mozjpeg": ["-optimize", "-progressive"]
  },
  "jpegOptimizer": "jpegoptim",
  "optimizers": {
      "jpegoptim": ["--all-progressive"]
  },

@jshow
Copy link

jshow commented Jan 19, 2021

I was able to solve short-term with the following config - changing the reduce into a resizes

"resizes": [
    {
      "directory": "downloads/",
      "suffix": "_sixty_percent",
      "size": "100%",
      "quality": 60
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants