504 Axios error on App directory with PRO PLAN
Unanswered
Oak apple gall wasp posted this in #help-forum

Oak apple gall waspOP
I am encountering a 504 error on my request. I'm attempting to await some functionality from a serverless function that takes roughly 3 minutes to complete. I have upgraded my plan to PRO. Additionally, I've exported the maxDuration variable as follows:
I've also provided a vercel.json file, which essentially instructs Next.js to increase the serverless execution time to 300 seconds. Furthermore, I've increased the Axios timeout parameter. However, I'm still receiving a 504 error after 1 minute of loading time.
I have also updated axios timeout parameter
Please assist me with this issue.
export const maxDuration = 300;
I've also provided a vercel.json file, which essentially instructs Next.js to increase the serverless execution time to 300 seconds. Furthermore, I've increased the Axios timeout parameter. However, I'm still receiving a 504 error after 1 minute of loading time.
{
"functions": {
"app/api/generators/**/*.ts": {
"memory": 3008,
"maxDuration": 300
}
}
}
I have also updated axios timeout parameter
const response = await axios.post(API_CLIENT_ENDPOINTS.refinedArticle, data, {
responseType: "json",
timeout: 300000, // 5 minutes
});
Please assist me with this issue.