[Bug]: Operation timeout with creation of 6+ shards
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
Note: Please view edit history to see the original purpose of this issue.
If you create a sharded client with 6 or more shards, at around the 6th shard, all shards are prevented from running. The bot will continue to receive dispatches but will be unable to actually process the events (debug logging notes the dispatches but handlers are not being invoked).
This may relate to one of my old issues: #2126
Version
3.11.0
Working Version
No response
Logs
[2023-08-01T03:43:27.3327Z][0029][][KVEX-WIN-234][bot][ERROR] DiscordInternal-EXCEPTION-Shard #6:
Error Type: System.TimeoutException
Error Detail: The operation has timed out.
Inner Exception:
Exception Stack Trace:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.ConnectionManager.<WaitAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.WebSocket.DiscordSocketClient.<OnConnectingAsync>d__118.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.ConnectionManager.<ConnectAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Discord.ConnectionManager.<>c__DisplayClass29_0.<<StartAsync>b__0>d.MoveNext()
Exception Source: mscorlib
Exception TargetSite: Void Throw()
Exception Data: System.Collections.ListDictionaryInternal
Sample
Instantiation
var client = new DiscordShardedClient(
new DiscordSocketConfig
{
GatewayIntents =
GatewayIntents.GuildMessages
| GatewayIntents.DirectMessages
| GatewayIntents.Guilds
| GatewayIntents.MessageContent,
LogGatewayIntentWarnings = false,
TotalShards = 10,
LogLevel = LogSeverity.Debug,
}
)
Packages
N/A
Issue Analytics
- State:
- Created 2 months ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Shards With Unavailable Guilds Not Starting · Issue #3956 ...
This issue is persistent across all versions of djs, including 12. The timeout happens around 90% of the time I start the shards....
Read more >Block delete times out for blocks created of very large size
Timeouts resulted in failed deletions and stale shards remaining in the .shard directory. Shard deletion is now a background process that deletes one...
Read more >ES 6.x - Timeout by REST API operations - Elasticsearch
I've got about 30 indices for the data I ingest each with 5 primary shards and 5 replica shards (now that I set...
Read more >MongoDB balancer timeout with delayed replica
We have a setup of two mongodb shards. Each shard contains a master, a slave, a 24h slave delay slave and an arbiter....
Read more >Failed to update shard information for ...
This guide will help you check for common problems that cause the log “Failed to update shard information for ClusterInfoUpdateJob within 15s timeout”...
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
Reopening as a new error has been encounted, after this error it will continously throw this error. It may be occuring in the GuildDownloader, but it also happens on my other test. After the 6th or 7th shard it will always throw this error.
@DeclanFrampton this is the full exception on a debug build.