I am trying to develop an app in NextJS which makes a call to openAI. the call takes 20 seconds, I have placed this inside a nextjs api route.
I was using vercel to start with and I tried netifly to see if they allowed this, but they don’t either… Is there any workaround for this?
Cheers
@BenParr64 Just to clarify, this is a call that is happening within a serverless function, and thus the question is about serverless function execution limits?
If so, Netlify can bump the allowed execution time up for you provided that you’re on a paid plan.
See:
Hello!
Would it be possible to increase the timeout limit for https://approvals.netlify.app/ please?
Our webhook usually completes in under 10 seconds, but every month we have a couple that time out, causing us to lose data. The higher the better (26s?), but 20s should be enough.
Thank you!
If you let us know the site name (and if it’s on a Pro or above plan), we can bump it to 26 seconds (maximum supported).
I am assuning nextjs api routes are serverless functions? But not on a paid plan as just playing about so no worries! Thanks anyway guys!