Discord.Net: [Bug]: Gateway infinite hang after a while.
Check 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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 31 (17 by maintainers)
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?
@quinchs Sorry for the late reply, we’ve been backed with work. We’ll take a look at it today and get back to you when it decides to have issues.
@quinchs I think it may have been the thing I dismissed 😕. Will do some staging with the change to fix it to determine if it is.