question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Gateway infinite hang after a while.

See original GitHub issue

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…”: img

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:closed
  • Created 2 years ago
  • Comments:31 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
quinchscommented, Mar 29, 2022

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 image

2reactions
quinchscommented, Mar 26, 2022

I will do some more investigating on this. If possible could you find out what version post 3.0 can stay up?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found