console.log(
"Flask server URL:",
process.env.NEXT_PUBLIC_FLASK_REDIRECT_URL
);
const response = await fetch(
`${process.env.NEXT_PUBLIC_FLASK_REDIRECT_URL!}/process`,
{
method: "POST",
body: formData,
signal: controller.signal,
}
);
clearTimeout(timeoutId);
if (!response.ok) {
throw new Error("Failed to send PDF to Flask server");
}
This is codes on my page.tsx client code. And it request to Flask server which is deployed on AWS EC2. But this request consume usually 5 minutes. And currently, the vecel handle this as an error, because it doesn’t get response from server. I am trying to time sleep code, but it does not work. Can I change the option through vercel as even there is no response for 5 minutes, it is not an error?
Deployment URL or Custom Domain: https://vercel.com/jun-songs-projects/business-contract-analyzer
Environment (local, preview, production): Client code - vercel, Flask server - AWS EC2
Project Framework:
Build Settings:
Framework Preset:
Build Command (if not default):
Output Directory (if not default):
Install Command (if not default):
Node/Runtime Version:
Package Manager:
Relevant Packages: