Next.js Discord

Discord Forum

[MEMORY LEAK] Turbopack breaks middleware and page rendering in general

Unanswered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
Hiya! I know that Turbopack is not yet production ready, but I'd like to share some issues that I'm experiencing.

I am using next-intl (3.0.0-beta.9 specifically for server side compatibility) which requires some middleware.
When trying the --turbo flag, that middleware seems to break as the client is no longer redirected to a URL like /language. Navigating to /en manually leaves turbopack rendering the page infinitely.
That's all fine, and I'm sure that all these issues will be resolved due course, I am wondering however what the best way is the debug these sort of issues?

2 Replies

Brown bearOP
Besides that, the rendering process (presumably) is eating some 94gb of ram, still increasing. Seems like a memory leak (I was wondering why my macbook was starting to get a bit slow 😅)
Feel free to clone and try for yourself, as the code can be found on Github. Just make sure to add the --turbo flag to the dev-next script in the package.json file 😃
https://github.com/theopensource-company/playrbase