Garbage collection (possibly) and seeking help with diagnosing issues.
Unanswered
Pacific anchoveta posted this in #help-forum
Pacific anchovetaOP
Hey!
A short story for context.
I have a NextJs app hosted on Railway that is constantly used by around 10 people (a small company), from 8am to 4pm weekdays). It's not anything heavy, it's a CRM with mostly CRUD operations that stores data in postgres.
Few days ago I added uploadthing for pictures and the memory usage jumped up to over 2GBs of RAM. I was pretty sure it's the library issue once I removed uploadthing after around a day, the memory usage jumped back to normal (around 150-200mb). Right now it just randomly spiked to 2.5gbs, and after several hours dropped down. Currently it is using 900-1000mb of RAM.
It is all pretty random and I do not know what might be causing it. I was thinking it's a garbage collection pattern but once again I am not sure. I am also at a noob-junior level so this might be just issue with my code.
I came here to ask for help and any guidance as to how to diagnose the culprit. I am just not sure what I should do at this point.
A short story for context.
I have a NextJs app hosted on Railway that is constantly used by around 10 people (a small company), from 8am to 4pm weekdays). It's not anything heavy, it's a CRM with mostly CRUD operations that stores data in postgres.
Few days ago I added uploadthing for pictures and the memory usage jumped up to over 2GBs of RAM. I was pretty sure it's the library issue once I removed uploadthing after around a day, the memory usage jumped back to normal (around 150-200mb). Right now it just randomly spiked to 2.5gbs, and after several hours dropped down. Currently it is using 900-1000mb of RAM.
It is all pretty random and I do not know what might be causing it. I was thinking it's a garbage collection pattern but once again I am not sure. I am also at a noob-junior level so this might be just issue with my code.
I came here to ask for help and any guidance as to how to diagnose the culprit. I am just not sure what I should do at this point.