-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Memory allocation failure from V8: JavaScript heap out of memory #354
Comments
First crash: bot was ready at 8:48 UTC. Crashes after almost seven hours at 15:36.
|
Second crash: bot restarted at 15:37 UTC. Crashes after almost four hours at 19:19.
|
The preview bot has not been affected by this, but it's only in a couple of servers and sees very little traffic. |
https://nodejs.org/en/docs/guides/diagnostics/memory/using-gc-traces #354: identify whether a base image change is responsible for the memory allocation crashes
Original master moved to https://github.com/DawnbrandBots/bastion-bot/tree/master-354. New commits to master will have |
From over 13 hours in operation, it's most likely not due to a base image change. No crashes. Memory usage is stable with several good mark-sweep cycles. |
Proceeding to cherry-pick all non-dependency code changes for tonight. d2ca81d is now the last-known good commit. |
Still stable! Leaving this to run another day while I cherry-pick all dependency updates minus the http2-wrapper force update 6a22f75 |
The leak might just be in http2-wrapper: szmarczak/http2-wrapper#96 szmarczak/http2-wrapper#97 |
Cases from newer versions of got that by default use the newer http2-wrapper: sindresorhus/got#1516 sindresorhus/got#2160 sindresorhus/got#2225 sindresorhus/got#2288 |
Crash occurred again with a95b43f (deployment, rollback) Discord.js just released 14.13.0 suggesting that it is responsible for the leak. See also discordjs/discord.js#9759 discordjs/discord.js#9763 |
The run with a95b43f was characterized by a high number of scavenge attempts per actual bot trigger processed and elevated memory usage. Presumably, this is the garbage collector desperately hunting for memory as its all consumed by the Discord.js message caches. |
Between 1e175ea (image, deployed July 9 8:16 UTC) and 6f5d636 (image, deployed Aug 13 9:46 UTC), something was introduced, likely in the base Docker Node image, that causes Node.js to crash after a few hours of operation.
This change has been rolled back in production.
git diff in case. (Maybe an updated dependency has some type of memory leak.)
The text was updated successfully, but these errors were encountered: