ChokSheak Lau, Based on the scenario description, I understand that you are receiving timeout issue during the deployment of your Next.js SSR of Static WebApp.
Are you referring to any Azure docs for the steps? How exactly are you provisioning the deployment?
To narrow the issue, you may try the following steps (If you haven't done already so):
-On a similar discussion thread that I'd handled , you may update build command.
"build": "next build && cp -r .next/static .next/standalone/static/ && cp -r public .next/standalone/"
-The maximum app size for the hybrid Next.js application is 250 MB. Use standalone feature by Next.js for optimized app sizes. If this is not sufficient, consider using Static HTML exported Next.js if your app size requirement is more than 250 MB.*
-The hybrid Next.js websites on Azure Static Web Apps is in preview, kindly have a look at the :Unsupported features in preview -Some features are not supported, so please double check that your configuration does not rely on unsupported features like navigation fallback or certain properties in staticwebapp.config.json.
Kindly let us know how it goes, I'll follow-up with you further.