-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(bug) memory leak #551
Comments
|
This is known to be caused by a performance regression in the TypeScript compiler. The compiler needs to be updated in order to fix this. There's nothing grammY can do. Fortunately, this was reported before in #543 so we were able to report this back to Microsoft along with a minimal reproduction example that I had created months in advance (I expected something like this to happen for a different reason). Microsoft has acknowledged and fixed the bug already. However, the fix isn't released yet. For now, you can fix this using: npm install typescript@next Please let me know if that helps. |
It seems like the underlying perf improvement does not suffice to fix this, so you probably need to go with |
You may want to help out by looking at https://github.com/grammyjs/grammY/tree/fix-fq?tab=readme-ov-file#how-to-repro |
After this, a memory leak occurs. This happens at the "context" type calculation stage. At this point, the RAM is loaded by 2 GB. At the same time, the tsc may hang until the end of the calculations, and if there is not enough memory, the program will crash with out of memory error. Until you add
ctx => ...
, everything is fine.This only works with events starting with a colon and shortcuts.
This bug occurs when using the "Combine With OR" method. Therefore, the bug is with
:text
, because:text
is an alias tomsg:text
, andmsg
is the same as["message", "channel_post"]
, and this, in turn, is combine.The text was updated successfully, but these errors were encountered: