https://serverless-stack.com/ logo
#sst
Title
# sst
d

Dillon Peterson

11/07/2021, 1:37 PM
Currently getting a 503 on all of my NextJsSite API endpoints. Has anyone else had this issue?
r

Ross Coundon

11/07/2021, 1:38 PM
@Justin Philpott was seeing this yesterday
d

Dillon Peterson

11/07/2021, 1:48 PM
I'm going to try updating to latest version of SST 0.50.2 to see if that fixes it.
Currently on 0.47.0
@Justin Philpott I will keep you updated
That did not fix it.
f

Frank

11/07/2021, 5:28 PM
Hey @Dillon Peterson, was the site working before and started happening recently?
d

Dillon Peterson

11/07/2021, 5:30 PM
Yes Sir just started happening recently!
@Frank
Any ideas?
f

Frank

11/07/2021, 5:34 PM
Yeah, let’s do some debugging. Where are you currently located geographically?
d

Dillon Peterson

11/07/2021, 5:34 PM
McAllen TX
f

Frank

11/07/2021, 5:39 PM
I see when you view the Site, the logs are stored to ur local region.
Can you try going into the CloudWatch console and select the Ohio us-east-2 region?
d

Dillon Peterson

11/07/2021, 5:44 PM
Yes Sir I will go check now
I don't see us-East-2 showing anything.
f

Frank

11/07/2021, 5:48 PM
I see.. which region is the Site deployed to?
d

Dillon Peterson

11/07/2021, 5:48 PM
us-east-1
f

Frank

11/07/2021, 5:49 PM
lemme give it a give try on my end
are all pages not working? Or specifically SSG pages or SSR pages?
d

Dillon Peterson

11/07/2021, 5:49 PM
It's just the API Edge Lambdas
All front end pieces are working ok
f

Frank

11/07/2021, 5:51 PM
A few type of pages rely to Edge Lambdas behind the scene: the Server Side rendered pages, Client Side rendered pages, image optimization, etc
d

Dillon Peterson

11/07/2021, 5:51 PM
I see this error.
f

Frank

11/07/2021, 5:54 PM
I see. Let me check something quickly.
What’s the name of this log group?
f

Frank

11/07/2021, 6:27 PM
trying on my end..
hmm… works on my end
which version of Next.js are you using?
d

Dillon Peterson

11/07/2021, 7:15 PM
Latest version!
What about you?
I'm trying now with same version from your NextJS tutorial
Will keep y'all posted
f

Frank

11/07/2021, 11:23 PM
@Dillon Peterson sorry afk just now
d

Dillon Peterson

11/07/2021, 11:23 PM
11.1.2
f

Frank

11/07/2021, 11:23 PM
so u were using the new Nextjs 12?
d

Dillon Peterson

11/07/2021, 11:24 PM
Yes Sir
I was afk too, so no worries!!
f

Frank

11/07/2021, 11:24 PM
oh I see. Lemme give Nextjs 12 a try as well.
just curious… any specific Nextjs 12 feature made u decide to update?
d

Dillon Peterson

11/07/2021, 11:29 PM
No Sir, the package.json just had "latest" in there, I wasn't locking versions yet. So it just got updated on an npm install
I don't need any of the additional features of NextJs 12 for my current work. 😊
j

Joe Kendal

11/08/2021, 12:20 AM
@Frank I would like to upgrade to v12 when SST supports it as we are looking to do A/B testing on our sites.
The middleware seems to open a lot of use cases. Would be nice to plan for those in the future, although not essential
Feature flags too
f

Frank

11/08/2021, 12:48 AM
@Dillon Peterson I’m able to reproduce the issue after upgrading to v12
Can you pin it to v11 and give it a try?
@Joe Kendal Yeah for sure! v12 support is definitely on our roadmap.
t

Tharshan

11/08/2021, 9:36 AM
I had a similar issue and concluded it was next 12 upgrade too! Looking forward to the support. I'm also mostly looking forward to using Middlewares
d

Dillon Peterson

11/08/2021, 2:55 PM
That fixed it!! Thank you so much @Frank.
@Frank I'm getting this error again
Using NextJS 11.1.2
SST version 0.53.0
I've been going through everything, it's def some kind of AWS issue. I'm getting a 503 on every NextJS API endpoint, and also on every SSR page.
Ok, I think I found something. It appears the Lambda@Edge API functions are being assigned an IAM role that does not exist.
API endpoints have been fixed by changing AWS CDK version. Now it's just the SSR pages not working. All returning 503s
j

Joe Kendal

12/04/2021, 12:46 PM
I’ve decided to abandon this construct following the announcement of Vercel’s $100M round. They are committed to reinvesting in Next.js and their cloud so it will be next to impossible (pun not intended) for the open source project to keep up with features and performance.
2 Views