Hey, i have the same problem and i dont understand why that dosent working there is some full “out of memory”
"The app exceeded the memory limit" - caught in a loop. How to restart automatically / at all?
Hi @nukleel, welcome to the Glitch forum!
I’ve moved your post to its own topic so we can take a look at it independently. Can you provide your project name so we can take a closer look?
ok thanks, the project was named glitter-vise, it’s a private project say me if you want this not be private
the problem just reveal when i execute a command with my bot
I think I see what might be going on (which is itself unusual - memory leaks are often pretty hard to figure out).
In your bot’s code you’re attaching an event handler to the message event, which is great. Your bot then executes all the code in that event handler every time it gets a message, and in this case that means that your code that attaches a handler to the ready event gets run every time your bot gets a message, so you’re probably attaching dozens (or even hundreds) of separate event listeners to the same event. Each of those listeners takes up a bit of memory, and you really need only one of them.
If you move your event handler starting at https://glitch.com/edit/#!/glitter-vise?path=server.js:46:0 outside of the one that starts at https://glitch.com/edit/#!/glitter-vise?path=server.js:33:0 I think you’ll see a pretty quick improvement.
Let us know how that goes!