[Bug]: Gateway infinite hang after a while.
See original GitHub issueCheck The Docs
- I double checked the docs and couldn’t find any useful information.
Verify Issue Source
- I verified the issue was caused by Discord.Net.
Check your intents
- I double checked that I have the required intents.
Description
After a while into the bot’s runtime, it could be around 5 hours, or even 10 days, the discord gateway will straight up just hang infinitely, with the message of “Disconnecting…”:
This isn’t always preceded with a blocking issue. I want to know if you have ever had this issue, this issue has been discovered yet, or if this is possibly just a .NET issue.
Bot is running on net48, LangVersion 10, on a VM with 8 vCPUs and 8 GiB of memory, on Windows Server 2019, 400MiB/s DOWN and 40MiB/s UP Sharding is disabled.
Version
v3.0.0-dev-dev
Working Version
No response
Logs
[2022-02-21T15:43:42.5093Z][5018][0014][56700.3657842][win32nt-amd64][4.0.30319.42000][1.0.8079.2135][Release][10.128.29.28][JFK-01-DApp181][dapp181-dec.distrubuted.jfk-01-us-east-01.mfdlabs.local][bot][INFO] Renewing vault client's token, '_____'
[2022-02-21T15:53:11.6539Z][5018][005f][57269.4995718][win32nt-amd64][4.0.30319.42000][1.0.8079.2135][Release][10.128.29.28][JFK-01-DApp181][dapp181-dec.distrubuted.jfk-01-us-east-01.mfdlabs.local][bot][INFO] DiscordInternal-INFO-Gateway: Disconnecting
[2022-02-21T15:53:11.6559Z][5018][005f][57269.5013986][win32nt-amd64][4.0.30319.42000][1.0.8079.2135][Release][10.128.29.28][JFK-01-DApp181][dapp181-dec.distrubuted.jfk-01-us-east-01.mfdlabs.local][bot][INFO] DiscordInternal-INFO-Gateway: Disconnected
[2022-02-21T15:53:12.6609Z][5018][0014][57270.5064444][win32nt-amd64][4.0.30319.42000][1.0.8079.2135][Release][10.128.29.28][JFK-01-DApp181][dapp181-dec.distrubuted.jfk-01-us-east-01.mfdlabs.local][bot][INFO] DiscordInternal-INFO-Gateway: Connecting
[2022-02-21T15:53:15.9079Z][5018][006a][57273.7533737][win32nt-amd64][4.0.30319.42000][1.0.8079.2135][Release][10.128.29.28][JFK-01-DApp181][dapp181-dec.distrubuted.jfk-01-us-east-01.mfdlabs.local][bot][WARNING] DiscordInternal-WARNING-Gateway: A MessageReceived handler is blocking the gateway task.
[2022-02-21T15:53:42.6645Z][5018][0042][57300.5093878][win32nt-amd64][4.0.30319.42000][1.0.8079.2135][Release][10.128.29.28][JFK-01-DApp181][dapp181-dec.distrubuted.jfk-01-us-east-01.mfdlabs.local][bot][INFO] DiscordInternal-INFO-Gateway: Disconnecting
Sample
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:31 (17 by maintainers)
Top Results From Across the Web
Infinite loop in web dev freezes the gateway - Ignition
With an infinite loop that's exactly what I would expect. TheGateway is having to allocate more memory each time through the loop.
Read more >Why am I getting stuck in an infinite loop when trying to use ...
When I run the program I get stuck in an infinite loop of "Checking if the tests are inputted and put in a...
Read more >Has Blizzard acknowledged the problem with getting stuck ...
Has Blizzard acknowledged the problem with getting stuck in an infinite loading screen when taking a portal back to a dungeon?
Read more >UI freezes (infinite loop) after losing focus : GTW-3088
1. Start session (I'm using gateway) · 2. Everything is fine while the window is in focus · 3. The moment it loses...
Read more >Hangs indefinitely while running tests · Issue #1235
Though tests run fine in the runner, upon running them inside Command Line, after getting through a few tests, it hangs indefinitely, no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One I merge in #2212 I will be able to create an override for you all to diagnose/attemt to fix this as I cant reproduce this locally. All my bots have been running for >1 month
I will do some more investigating on this. If possible could you find out what version post 3.0 can stay up?