Next.js Discord

Discord Forum

Issues running Next.js app in more than one instance with ECS AWS Fargate

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
I have a Next.js App running in ECS Fargate behind an Application Load Balancer.

The app starts with 10 instances and scale downs to 1 evetually, due to lack of demand.

Once I deploy the app with 10 instances, it is broken. That means, the app does not have access to properties on "router.query" which are essential for the app to work.

After it scales down to 1 instance, it works good again.

What is happening with 10 instances that breaks the app?

How could debug it?

Any insights on that situation would be helpful.
I am using Pages folder and last Next.js version, if that is relevant.

0 Replies