Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System crashed while using the content-based file convention with maximum heap memory usage #4098

Open
jeevankc17 opened this issue Jan 29, 2025 · 5 comments
Labels
bug Something isn't working reproduction needed

Comments

@jeevankc17
Copy link

Describe the bug Hey this is my current project structure

Image

I have contentDirBasePath: "/license" on the next.config.ts file for now

Now I tried to put all the existing 3 folder from the app directory into the content directory, as I want them as a separate page, I tried to make contentDirBasePath: "/ " on next.config.ts and give href accordingly on _meta.json.

Image

Suddenly got issue like maximum resource used in heap memory of the nodejs and everything crashed.

I think that might be lot of static files been built or there was limitation around the content-based file system mapping multiple directories at once. I don't have any clue

Is there any limitation using the content-based directory then using page.mdx file?
Is content based file convention is really a bottleneck?
Nextra team doesnot mention that downside on their documentation.
Do I need to focus on page.mdx approach?

@jeevankc17 jeevankc17 added the bug Something isn't working label Jan 29, 2025
@dimaMachina
Copy link
Collaborator

please create a reproduction repo

@dimaMachina dimaMachina added help wanted Extra attention is needed question Further information is requested labels Jan 29, 2025
@jeevankc17
Copy link
Author

Hey @dimaMachina Nextra by default build every mdx file statically at build times since I have more than 400 mdx files and I can't build all that on a vercel free plan , anyways I mean this consuming lots of memory.
I am planning to implement dynamic import like this
Screenshot_2025-01-31-12-36-23-372-edit_com.openai.chatgpt.jpg

Is this the way.
please mention any articles regarding this if there I did not find any

@jeevankc17
Copy link
Author

jeevankc17 commented Jan 31, 2025

@dimaMachina

Image

Same issue on local environment too taking lots of memory to build and still exhausted as every file being built statically at once,
How to solve this?

@jeevankc17
Copy link
Author

@dimaMachina hey ?

@dimaMachina
Copy link
Collaborator

#4098 (comment)

@dimaMachina dimaMachina added reproduction needed and removed help wanted Extra attention is needed question Further information is requested labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduction needed
Projects
None yet
Development

No branches or pull requests

2 participants