#Bot keeps getting disconnected with same error

20 messages · Page 1 of 1 (latest)

steady glacier
#

My bot keeps getting disconnected with the same error. The error itself isn't very helpful (berserk.exceptions.ApiError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) and I can't find any info on this. I'd like to be able to at least understand why that's happening so I can prevent it without adding a try-except that ignores it. From the logs it seems to only happen when I try to do any actions that involve client.bots. I'm not sure if this is a ratelimit since all I'm getting is the ApiError without any additional info.

steady glacier
#

I seriously can't fix the issue if I don't know the root cause. I can't tell if it's a 429, or something else, but I'd really like to be able to keep my bot running.

onyx pendant
#

it says "connection aborted" so it's not a 429

#

you can't get a valid response code in a case like this

steady glacier
#

so why is the connection being aborted? is it an error on my end?

onyx pendant
#

impossible to say from afar. does it work if you call it again afterwards?

steady glacier
#

I don't know, the bot isn't running right now, and im not home. The error always kills it. I can relaunch the bot, if that's what you're asking, but the error is persistent

onyx pendant
#

then i'd suggest setting up a retry mechanism. requests can always fail for random reasons so it's always a good idea to make sure possible failures are handled.

steady glacier
#

yeah I had a try-except in place until I could find an actual fix, where the bot would resign (since it kills my move-choice loop) but the error somehow persisted through that.

#

since I thought it was a 429 it also waits 15 seconds before resigning

onyx pendant
#

but you still get the same error after 15 secs?

#

also not sure why you'd need to resign?

#

you should be able to do the same request in the same place?

steady glacier
#

the resign is just me being lazy kek

#

I could keep it going if I really wanted to, but I'd rather fix the error first

#

and it's been a while since I had the bot running, I'll restart my vps when I get home then relaunch the bot and see what happens. I also started getting some new errors since regarding the client event for loop I think, though im not saving logs so I don't really know.

#

OHHH WAIT I KNOW

#

my dumb code doesn't check which game it's playing and tries to move on the wrong board

#

I'll check on it when I get home because this is probably not it, but now that I think about it it does have a tendency to crash when there's more than one game going on

#

tysm for the help, I'll probably need some more later 🙏