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

Duplicate requests on vercel using ISR #12334

Open
vettloffah opened this issue Jun 13, 2024 · 0 comments
Open

Duplicate requests on vercel using ISR #12334

vettloffah opened this issue Jun 13, 2024 · 0 comments

Comments

@vettloffah
Copy link

Describe the bug

I'm seeing a lot of duplicate requests when a user visits our website. We are running on Sveltekit with ISR using the guide here: https://kit.svelte.dev/docs/adapter-vercel#incremental-static-regeneration

When I inspect the logs in vercel, there are quite a few 200 requests that happen 3 times. I've noticed a pattern that if there is a Cache STALE then there are two Cache MISS requests immediately following it.

If there is a Cache HIT there is only one request.

image

here is config for one of the routes:

export const config = {
	isr: {
		// revalidate every 10 minutes
		expiration: 60 * 10,
		bypassToken: ISR_BYPASS_TOKEN
	}
}

My question is if it's expected behavior for there to be 3 requests (1 cache STALE, 2 cache MISS) or if we have an extra request happening? It's occurred to me it could be the first request to a stale page, then a request to get the new data, but am not sure why there would be a third request.

Reproduction

No reproduction instructions

Logs

No response

System Info

npmPackages:
    @sveltejs/adapter-vercel: ^4.0.5 => 4.0.5 
    @sveltejs/kit: ^2.5.9 => 2.5.9 
    @sveltejs/vite-plugin-svelte: ^3.1.0 => 3.1.0 
    svelte: ^4.2.17 => 4.2.17 
    vite: ^5.2.11 => 5.2.11

Deploying on vercel with node 20.x

Severity

annoyance

Additional Information

No response

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

1 participant