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

IPX fails sometimes under high load #1657

Open
capraruioan opened this issue Dec 31, 2024 · 4 comments
Open

IPX fails sometimes under high load #1657

capraruioan opened this issue Dec 31, 2024 · 4 comments
Labels
bug Something isn't working needs reproduction

Comments

@capraruioan
Copy link

We just deployed in production a news website, so we have high traffic.. All generated images are cached so we don't hit ipx everytime

However, some images are failing with a 502 error sometimes

I did a test with this piece of come

for (var i = 0; i <= 200; i++) {
	ff(i)

}

function ff(i) {
	setTimeout(() => {
		var img = document.createElement('img');
		document.body.appendChild(img);
		img.src =  '/_ipx/f_webp&enlarge_true&fit_cover&s_680x420/link_to_image?qq=' + Date.now() + '-' + Math.random();
	}, i * 50)
}

On staging env where is low traffic we have 200/200 successful requests
On production we have about 10/200 failed images when requesting directly on the nuxt app and we have 10-20 failed when requesting through the cache layer

Anyone else encountered this?

@Baroshem
Copy link
Collaborator

Baroshem commented Jan 8, 2025

Would you be able to provide reproduction in stackblitz where this issue occurs? :)

@Baroshem Baroshem added bug Something isn't working needs reproduction labels Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a template for starting with a minimal reproduction:

👉 https://stackblitz.com/github/nuxt/image/tree/main/example

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

@capraruioan
Copy link
Author

@Baroshem I am not able to provide a reproduction. As I said, this happens on high loads and I cannot simulate that on stackblitz

it happens also when accessing the image url directly as the example I've provided

@danielroe
Copy link
Member

this might be worth raising upstream on https://github.com/unjs/ipx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction
Projects
None yet
Development

No branches or pull requests

3 participants