2 years ago
Hello, I have a blog made with NextJS and I've noticed that the memory usage is always at 1.2gb. The majority of the app is static so I'm wondering if it's normal or should I investigate potential code issues? Can I have more info about this memory usage?
Fyi, I have the Pro Plan because I've noticed some issues during the fetch from the CMS in the same project during the build of the static blog. Now I'm paying 65$ for a static website. :\
5 Replies
Status changed to Awaiting User Response Railway • over 1 year ago
2 years ago
Are you shipping a production build of your Next site?
Yes
Status changed to Awaiting Railway Response Railway • over 1 year ago
2 years ago
did you check out next's docs on ram usage ? unfortunately it's hard for us to help, but isn't a surprising issue coming from next. I would suggest setting a new service that replicates your current next app and running next's recommended profilers and analyzers to see if you catch anything.
Also, I'm seeing a ramping usage post-deploys. do you by any chance have large api requests being cached by next's default fetch caching ? this can cause growing memory usage too.
Best,
Nico
Status changed to Awaiting User Response Railway • over 1 year ago
2 years ago
I’m gonna test it thank you.
Yes I have large api requests cached. Does this can be an issue? I’m thinking to use some local api (payload) to fetch the content but I think it will be the same since it will be cached.
Anyway, now for some reason the memory usage seems to be lower…
Status changed to Awaiting Railway Response Railway • over 1 year ago
2 years ago
The cache could explain some of the ram usage. I'm going to solve the thread for now, but feel free to reopen it if this happens again !
Status changed to Awaiting User Response Railway • over 1 year ago
Status changed to Solved itsrems • over 1 year ago
