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
[NextJS][ISR] intermittent 503 errors for ISR pages #2175
Comments
I had to update the IAM policy of the Lambda manually to include: {
"Effect": "Allow",
"Resource": "arn:aws:sqs:us-east-1:253925498289:<SQS-ID>.fifo",
"Action": [
"sqs:SendMessage"
]
} Does your Lambda have the correct permissions? I am in the process of writing a GitHub issue dedicated to this problem. |
Yeah I can confirm that I have the proper IAM policy. Here's the CloudWatch logs |
yes, if you create an app initially not using ISR, then you add an ISR page, then you will need to manually update the IAM policy on the lambda. |
Also have the exact same issue. My API route averages 18-20s on local, but when deploying to Amplify, it times-out at 10s. Heres my StackOverflow post: https://stackoverflow.com/questions/68957437/how-to-increase-timeout-of-amplify-nextjs-ssr-function-from-10s-to-30s |
We're having a similar issue with a Next.js app. The API routes we configured often can take more than 10 seconds so we'd love to be able to configure the default timeout on the auto-generated Lambdas. It's possible to change it on the Lambda manually, but it will get overwritten next time the project builds. |
@nicksemansonos @drmzio we have updated the default timeout to 30sec. Please let us know if you're still having issues. |
This is amazing @swaminator, thank you! We've had a redploy in the last 9 hours and I'm still noticing that our lambdas are configured with a 10 sec timeout. Anything special we need to do in order to get the new values? |
I still have this problem in my ISR next.js app. What should I do any change my environment? Thanks. |
Hello! I'm also facing the issue of getting 503 pages. I have a page, where getStaticPaths returns { path: [], fallback: true} and getStaticProps returns {..., revalidate: 900}. First I got the 503 immediately after accessing that page. Which was resolved by increasing the lambda timeouts to 30sec (so i guess the lambda function responsible for the fallback prerendering timed out). But the 503 occurred again on the same page later, when the regeneration was triggered. This time it was the lacking sqs permissions of the lambda functions. I'm not sure though how I am supposed to resolve this issue in a way that persists over redeploys. Am I supposed to completly recreate my amplify project? |
In ISR lambda we are still seeing 10 sec as default timeout, whereas other lambda have 30sec. Please help it is blocking us to adopt amplify |
I'm also having this 503 issue with a deployed page using getStaticPaths/Props.. however, i couldn't find those roles in IAM and so wasn't sure where to update the policy, the closest match was these: do I need to manually create these roles or am i just looking in the wrong place? |
Update: found how to get those role names (had to change the location in lambda console to see the lambdas then get their role names from there), checked the permissions and everything is set but still seeing 503 errors on deployed pages using getStaticPaths/Props |
UPDATE: |
same happening to latest version, had to downgrade, any update on this? |
I upgraded from NextJs 11.1.2 to Next 12.3. I cannot see the Image. Gives the 503 error But the weird thing is I am not using next/image but a normal HTML img tag Tried downgrading to next@12.0.8 but still no luck |
Before opening, please confirm:
App Id
dh2ndod2t9wbt
Region
us-east-1
Amplify Console feature
Custom builds, Performance
Describe the bug
Expected behavior
Reproduction steps
Build Settings
Additional information
I have to manually go into the console and change the timeout value from 10 to 30 between every deploy
The text was updated successfully, but these errors were encountered: