Skip to main content

Mondaycom/apps-sdk memory leak

  • November 26, 2024
  • 6 replies
  • 39 views

Forum|alt.badge.img

We have an app for monday and we are working with mondaycom/apps-sdk package to get storage in our backend so when we deployed our backend server we got R14 error (R14 - Memory Quota Exceeded) this line triggers the error: let storage = new Storage(token);

6 replies

dvdsmpsn
Forum|alt.badge.img+1
  • Participating Frequently
  • November 26, 2024

Wait, are you on Heroku? Fix the problem there.

Isn’t Storage a monday-code thing?

And sorry if it isn’t.


Forum|alt.badge.img
  • Author
  • New Participant
  • November 26, 2024

hello David,
we use heroku for our backend,
Storage from mondaycom/apps-sdk this this our code

const { Storage } = require("@mondaycom/apps-sdk");
const getStorage= async ({ id,token}) => {
  let storage
  try { 
   storage = new Storage(token);
   let { value, version } = await storage.get(`${id}_key`, {shared: true,});
    return value
  } catch (error) {
    return null;
};
}

shaika
Forum|alt.badge.img
  • monday.com Team Member
  • November 27, 2024

Basically the new Storage() line shouldn’t cause any major memory consumption as it doesn’t do anything other then logger initialization (code).
Can you explain how do you know that this exact line causes the memory quota exceeded error?


  • Participating Frequently
  • November 28, 2024

Isn’t that an error from when your app uses more memory than currently available in dyno? Does not seem to be related to monday storage. Correct me if I am wrong.


Forum|alt.badge.img
  • Author
  • New Participant
  • December 2, 2024

hello @shaika
I use storage in many functions and I notice that there is memory leak when I use many call api related with the storage .


shaika
Forum|alt.badge.img
  • monday.com Team Member
  • December 5, 2024

Hi @BOUAA ,
If you think there is a memory leak in the package please open an issue in the repository: GitHub - mondaycom/apps-sdk