next-runtime icon indicating copy to clipboard operation
next-runtime copied to clipboard

[Bug]: Image generation broken

Open apfelbox opened this issue 2 years ago • 3 comments

Summary

Hi,

in one of our staging deployments, all images return a 502. If I open just the image in a new tab, I get the following error messages:

IPX Error: Error: vips__write: write failed\nunix error: No space left on device\n

Steps to reproduce

Not sure how to repoduce. Just open the following URL: https://blum-lehre-animations--21torr2018.netlify.app/_ipx/w_3840,q_75/%2F_next%2Fstatic%2Fmedia%2Fvertical_teaser_icons.3573aaee.gif?url=%2F_next%2Fstatic%2Fmedia%2Fvertical_teaser_icons.3573aaee.gif&w=3840&q=75

A link to a reproduction repository

internal repository

Plugin version

4.9.3

More information about your build

  • [X] I am building using the CLI
  • [X] I am building using file-based configuration (netlify.toml)

What OS are you using?

Linux

Your netlify.toml file

`netlify.toml`
[build]
    command = "npm run build"
    publish = ".next"

[[plugins]]
    package = "@netlify/plugin-nextjs"

Your public/_redirects file

`_redirects`
# Paste content of your `_redirects` file here

Your next.config.js file

`next.config.js`
const redirectsMap = require("./data/redirects.js");

/** @type {import('next').NextConfig} */
module.exports = {
	reactStrictMode: true,
	webpack (config)
	{
		config.module.rules.push({
			test: /\.svg$/,
			loader: require.resolve('@svgr/webpack'),
		});

		return config;
	},
	/**
	 * Loads the redirects
	 */
	async redirects ()
	{
		return Object.entries(redirectsMap)
			.map(([source, destination]) => {
				return {
					// Be sure to strip trailing slashes in source
					// We have Next.js configured to remove trailing slashes, so they are
					// removed before the redirect is looked up.
					source: source.replace(/\/+$/, ""),
					destination: destination,
					permanent: true,
				};
			});
	},
};

Builds logs (or link to your logs)

Build logs
# Paste logs here

Function logs

Function logs

not loading, I just get an endless spinner

.next JSON files

generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.

apfelbox avatar Jun 27 '22 14:06 apfelbox

I'm curious what the size of the original file is? As the error states, there's no space left and I believe we provide 512 MB of scratch space in /tmp, see https://aws.amazon.com/lambda/faqs/

nickytonline avatar Jun 28 '22 20:06 nickytonline

Hi,

as this happens for all our images, the answer differs a bit. But most of the images are well below 1MB.

Is there a way to have some introspection, to debug this further in Netlify?

apfelbox avatar Jun 29 '22 13:06 apfelbox

~~We're going to need a reproduction for this one to continue to look into it. Is it possible to create a minimal reproduction?~~

Just got a message from a principal engineer here, and it looks like the issue is in our netlify-ipx package. I've created an issue for us to fix this https://github.com/netlify/netlify-ipx/issues/45

sarahetter avatar Jul 07 '22 14:07 sarahetter

Same issue here ( https://get.flui.city/en/budget-participatif/ ) from time to time, randomly, some image doesn't load and we also get that IPX Error: Error: wbuffer_write: write failed\nunix error: No space left on device\n error when we open the image on a new tab.

Do you have any workaround while you're looking into fixing this issue?

jmeiss avatar Sep 01 '22 13:09 jmeiss

Closing in favour of https://github.com/netlify/netlify-ipx/issues/45

sarahetter avatar Sep 26 '22 13:09 sarahetter