Kord doesn't reconnect
I pretty much have issues since day 1 with my bot reconnecting, sometimes it just spams RetryLimitReachedEvent in my log
I don't know whether this is just an issue with my logging, but the bot actually doesn't work until a full restart
141 Replies
Also in the process of connecting 14 shards it pretty much happens all the time that when the last shard got connected other shards have been disconnected again
I haven't noticed this with an unsharded bot so it might be related to that
Hm, can you call the
GatewayBotGet
endpoint to see the max_concurrency
for your bot? Maybe it's because we don't properly handle it.It's hard to experience that issue with an unsharded bot as it only connects one shard
I think we do connect shards in parallel
and you are only allowed to connect one concurrently
so it's this issue again, you already opened https://github.com/kordlib/kord/issues/625
GitHub
Properly implement login rate limiting · Issue #625 · kordlib/kord
Currently we connect all shards at once and rate limit the identify command, which causes session resets and timeouts (see #624) A better solution would be to implement rate limiting for logins
IG that's what that means yes
yes
Kord seems to eventually give up reconnecting
I have an all shards ready event
And it consumes all other ready events and if all shards on the current instance are ready it fires
And it has logging and that logging tells me "waiting for [<all shards>]
Kord doesn't log anything
So it could be that which is broken
But that shouldn't affect commands
That event doesn't change some state
2022-09-19T20:28:01.550055599Z 2022-09-19 20:28:01.546 [DefaultDispatcher-worker-8] WARN dev.schlaubi.musicbot.core.Bot - Shard got disconnected 4 RetryLimitReachedEvent, Awaiting login from: [4, 12]@LustigerLurch this also happens
does this log come from kord?
It doesn't
It's my logging
but that basically means a RetryLimitReachedEvent was fired
And it never fires a ready event for that shard again
what does the trace logging for gateway events show?
gonna download .4 GB of LOGS real qiuck
however since enabeling trace logging the issue hasn't occurred yet
Fleet doesn't want to open it http://rice.by.devs-from.asia/u/4869Mq.png
srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.302 [DefaultDispatcher-worker-6] TRACE dev.kord.gateway.DefaultGateway - Gateway >>> {"op":2,"d":{"token":"token","properties":{"os":"Linux","browser":"Kord","device":"Kord"},"compress":false,"large_threshold":250,"shard":[12,15],"presence":{"status":"dnd","afk":false,"game":{"name":"Starting ...","type":0}},"intents":"3243773"}} srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.521 [DefaultDispatcher-worker-22] TRACE dev.kord.gateway.DefaultGateway - Gateway <<< {"t":null,"s":null,"op":9,"d":false} srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.540 [DefaultDispatcher-worker-10] TRACE dev.kord.gateway.DefaultGateway - gateway connection closing srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.543 [DefaultDispatcher-worker-10] TRACE dev.kord.gateway.DefaultGateway - Gateway closed: 4900 reconnecting srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.544 [DefaultDispatcher-worker-4] WARN dev.schlaubi.musicbot.core.Bot - Shard got disconnected 12 SessionReset, Awaiting login from: [0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14] srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.544 [DefaultDispatcher-worker-10] TRACE dev.kord.gateway.DefaultGateway - handled gateway connection closed srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.546 [DefaultDispatcher-worker-13] WARN dev.schlaubi.musicbot.core.Bot - Shard got disconnected 12 RetryLimitReachedEvent, Awaiting login from: [0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14] srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.701 [DefaultDispatcher-worker-10] TRACE dev.kord.gateway.DefaultGateway - Gateway <<< {"t":null,"s":null,"op":10,"d":{"heartbeat_interval":41250,"_trace":["["gateway-prd-main-gh00",{"micros":0.0}]"]}} srv-captain--votebot.1.kyi5nfvreqag@v220210987031163663 | 2022-09-19 21:41:12.703 [DefaultDispatcher-worker-12] TRACE dev.kord.gateway.DefaultGateway - Gateway >>> {"op":1,"d":null}Okay so op 9 is "The session has been invalidated. You should reconnect and identify/resume accordingly." That's what happens during startup
yeah, pretty sure it's because you are only allowed to login one shard at a time
we should fix this!
yeah
maybe this also causes the other disconnects
because if one shard disconnects
I get rate limmited