You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes to my ISR page take up to 5 minutes to update after the underlying data is changed.
Actual behavior
Let's say I have a user profile page which features a user's user name. This is a ISR powered page with revalidate option set to 1.
I open the page and see the username is delisdeli
I update the username of the user in the DB to newname with a SQL query
I open the page again and see username delisdeli
I immediately open the page again and see username delisdeli <= I would have expected to see newname now
I wait 5 minutes
I open the page again and see username newname
Expected behavior
I open the page and see the username is delisdeli
I update the username of the user in the DB to newname with a SQL query
I open the page again and see username delisdeli
I immediately open the page again and see username newname
Steps to reproduce
See above.
Screenshots/Code/Configuration/Logs
Can add later if needed.
Versions
OS/Environment: AWS Lambda Node.js 14.x
@sls-next/serverless-component version: 3.6.0
Next.js version: 11.1.2
Additional context
I believe the issue is due to SQS deduplication ID being set to the page ETag. Because the ETag will be that of the cached page in S3 and the deduplication ID is the same then SQS will ignore the regeneration messages (even after events are deleted from the queue) due to how SQS deduplication logic works (docs). I have tested setting deduplication id to current time in seconds and the behavior is as expected. Happy to open a PR if this is the right approach.
Code links that show deduplication ID is set to ETag:
You have reviewed the README and FAQs, which answers several common questions.
You have reviewed our DEBUGGING wiki and have tried your best to include complete information and reproduction steps (including your configuration) as is possible. As there is only one maintainer (who maintains this in his free time) and thus very limited resources, if you have time, please try to debug the issue a bit yourself if possible.
You have first tried using the most recent latest or alpha@sls-next/serverless-componentrelease version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the old serverless-next.js component and the serverless-next.js plugin are deprecated and no longer maintained.
The text was updated successfully, but these errors were encountered:
Issue Summary
Changes to my ISR page take up to 5 minutes to update after the underlying data is changed.
Actual behavior
Let's say I have a user profile page which features a user's user name. This is a ISR powered page with
revalidate
option set to1
.delisdeli
newname
with a SQL querydelisdeli
delisdeli
<= I would have expected to seenewname
nownewname
Expected behavior
delisdeli
newname
with a SQL querydelisdeli
newname
Steps to reproduce
See above.
Screenshots/Code/Configuration/Logs
Can add later if needed.
Versions
Additional context
I believe the issue is due to SQS deduplication ID being set to the page ETag. Because the ETag will be that of the cached page in S3 and the deduplication ID is the same then SQS will ignore the regeneration messages (even after events are deleted from the queue) due to how SQS deduplication logic works (docs). I have tested setting deduplication id to current time in seconds and the behavior is as expected. Happy to open a PR if this is the right approach.
Code links that show deduplication ID is set to ETag:
serverless-next.js/packages/libs/lambda-at-edge/src/default-handler.ts
Line 388 in e6367b5
serverless-next.js/packages/libs/lambda-at-edge/src/lib/triggerStaticRegeneration.ts
Line 60 in e6367b5
Checklist
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.The text was updated successfully, but these errors were encountered: