Mondaycom/apps-sdk memory leak

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);

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

Isn’t Storage a monday-code thing?

And sorry if it isn’t.

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;
};
}

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?

2 Likes

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.

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 .

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