NextJS SSR timing out after adding Material UI 5 + Emotion

I have a simple NextJS app making heavy use of SSR.

It was working normally, but after adding Material UI 5 (and Emotion) pages start to return a timeout error message from time to time.

It seems an inconsistent behavior. When a request succeeds, the following requests keep working normally for a while (I assume it is because of NextJS cache, which can be observed when running next start locally).

The timeout message is well know:
{“errorMessage”:“2022-01-13T17:00:04.683Z b6e8672d-b309-45e9-a991-2e852ad39beb Task timed out after 10.00 seconds”}

Maybe NextJs + Netlify is not advised for sites using big libraries.

How can I fix this?

Hey @julianoappelklein,

Which site is this regarding?