brandon76534
TTCTheo's Typesafe Cult
•Created by brandon76534 on 3/21/2025 in #questions
202 accepted on API requests for nextjs13 help
Hi, I am building a website using nextjs13, prisma on an Aws ec2 container with docker. Whenever I test my website on production sometimes some API requests will return a 202 accepted status and those requests will never be processed. I’m assuming this is because the nextjs13 thread is busy handling other api requests or other cpu intensive tasks. Though the end points I have are not really cpu intensive. I was wondering if you guys think the solution is a combination of a horizontal scaling of the nextjs containers and perhaps the offloading of some of the api work to a job queue or is there something im missing? Thank you, help would be very very much appreciated.
6 replies