#Which event handler? server failed to acknowledge more than 5 heartbeats - connection is zombie

1 messages · Page 1 of 1 (latest)

faint horizon
#

My bot routinely disconnects multiple times a week and never comes back up, and the process just stays running.

The error I get is [2024-07-09 21:13:39 +00:00] [110 /HeartbeatFai] [Crit ] Server failed to acknowledge more than 5 heartbeats - connection is zombie

Once these start, the bot goes unresponsive until I restart the process
I've tried everything I've seen mentioned in this discord involving this error including:

  • was on a nightly originally, upgraded to 4.4.6 stable
  • added event handlers for ClientErrored and SocketErrored
  • calling client.ReconnectAsync(true) in either handler
  • setting ReconnectIndefinitely = true in the Client Constructor

None of these seem to fix the issue or have any impact.

What am I missing? I run this bot on the same box as another bot and do not encounter this issue so that leads me to believe it's something I need to do in my code rather than an external factor

Guidance is much appreciated 🙏

tough wadi
#

was on a nightly originally, upgraded to 4.4.6 stable
Depending on the nightly version you "upgraded" from, thats an downgrade.

#

The other bot youre mentioning is also running on DSP?

faint horizon
#

Just checked my change to the csproj, I went from 4.4.0-nightly-01249 to 4.4.6.

The other bot is also running DSP, specifically 4.3.0-nightly-01160

tough wadi
#

Uh ok thats old

faint horizon
#

Yeah they've been on the older version for awhile. Figured i'd use this issue as an opportunity to upgrade a bit, but it didn't actually make a difference

#

I don't mind doing the work to move to 5.x if necessary, but figured this maybe was just a bug at some point that would be resolved by upgrading to a higher 4.x

tough wadi
#

not sure if thats a v4 specific bug, havent heard much about bugs like that

faint horizon
#

Is there some additional logging I should do that would help me come up with a solution? Cuz my first reaction is to just catch this error and then handle it (even though the lib should probably take care of it?)

#

but like I mentioned above, both ClientErrored and SocketErrored aren't catching it as far as I can tell

tough wadi
#

i think there is a Zombied handler

faint horizon
#

There is! Wow how did I not see that?

#

I will give this a try, I bet it solves my issue. Thanks mate!