aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
459 stars 116 forks source link

ISR pages are not regenerating on time #2190

Open yogeshydvme opened 3 years ago

yogeshydvme commented 3 years ago

Before opening, please confirm:

App Id

d3iusqza06a1ll

Region

ap-south-1

Amplify Console feature

Not applicable

Describe the bug

We had multiple pages with revalidate 10, but for some reason the regeneration is not taking place. Sometime randomly it regenerates the pages, but sometime completely missed the regeneration.

We tried multiple timestamps like after 5sec, 10sec, 20sec but the behaviour is very inconsistent. Not sure why this is happening.

Expected behavior

Amplify should respect revalidate and make sure it either generates the page or provide error in cloudwatch if generation fails.

Reproduction steps

NA

Build Settings

No response

Additional information

No response

swaminator commented 3 years ago

@yogeshydvme what version of Next are you using?

yogeshydvme commented 3 years ago

@swaminator 10.2.3

Athena96 commented 3 years ago

@yogeshydvme can you try with the latest version of next: next: 11.1.2 and the latest version of Amplify SSR (in the Build Settings, set the Next.js Version to latest: https://docs.aws.amazon.com/amplify/latest/userguide/server-side-rendering-amplify.html#update-app-nextjs-version)

janajri commented 3 years ago

I'm seeing a similar issue on my end. Our app id is: d1xm76k8s6lqms. I've set all revalidations to 1 minute and do not see the latest changes reflected after publishing our CMS / Contentful content. We've recently migrated away from Vercel into AWS directly, so I can verify that nothing has been changed during the migration.

SatadruBhattacharjee commented 3 years ago

+1, same issue with Nextjs 11 (with latest). ISR is not working. The same is working fine in Vercel

SatadruBhattacharjee commented 3 years ago

Any update on this ? it's kind of a BLOCKER

ferdingler commented 3 years ago

@SatadruBhattacharjee I'm sorry you are having issues. ISR should be working fine, can you check if your app meets the following requirements please?

Screen Shot 2021-10-14 at 9 28 21 AM

Screen Shot 2021-10-14 at 9 30 37 AM

Can you confirm this is the case for your app? And if it is, and still doesn't work, what is the error that you get?

SatadruBhattacharjee commented 3 years ago

Hi @ferdingler,

Thanks for your message. Just to confirm the ISR is working fine now with the above mentioned recommendations. Thanks.

yogeshydvme commented 3 years ago

How to update regenration lambda timeout, by default it is assigning 10 sec and usually while generating page it times out. Please help.

felixfirefighter commented 2 years ago

Also having the same problem here. The timing of the regeneration is very inconsistent. Currently using next 11.1.2, _LIVE_UPDATES is also already set to latest.

Any help is appreciated.

behrooziAWS commented 2 years ago

@yogeshydvme Have you deployed your app after October 7th? The timeout was raised to 30 seconds which is the max. Are you still seeing it timeout after 10 seconds?

behrooziAWS commented 2 years ago

Actually, looks like the timeout is still set to 10s on the regeneration lambda even after our change to update it. It only took effect on other lambdas. Will investigate further.

behrooziAWS commented 2 years ago

We've identified the issue causing the regeneration lambda timeout to be limited to 10s, we will follow up when it has been addressed.

yogeshydvme commented 2 years ago

sure, it will be very helpful

pogorsky commented 2 years ago

Any updates on this issue?