-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot seems to silently fail when reconnecting #387
Comments
Im not sure how to phrase this correctly, but its windows automatically freezing the command window after a bit |
I'm not exactly sure what you're talking about. I tested to see if the script was still running and it seems like it was. I was still able to print stuff to my console locally, but the connection to discord was completely nonfunctional. Additionally, it doesn't seem to try and reconnect ever again after this bug happens meaning the bot will be completely down until I manually fix it. I added in a sort of improper fix of automatically running my script again if the bot doesn't get any commands for an hour, but this fix is suboptimal as all variables are obviously reset when the script is executed again. As for using hosting, I'm running the bot off my dedicated windows server, so I don't think using a vps would change anything at all and would only have worse performance. |
Have you tried disabling QuickEdit mode? Command Prompt > Properties > Options > Quickedit |
I can try, but I don't see how that would change anything in this case. |
Did that fix it for you? |
How about using WireShark to see if or when does it stop sending any data? |
I mean I could use wireshark, but I have the source for everything running I might as well just add debug prints at that point. However, I recall @SinisterRectus saying he knows what the issue might be so maybe he can help us here. |
I've had a similar problem which is very rare. In the two years that I've been running 4 bots, this issue only happened 5 times. Discord requests a re-connection.. and nothing happens, the bot does not re-connect and the last line in the log is just that discord requested a re-connection. The bot eventually times out on discords end, appears offline, doesn't do anything anymore, but the script is still running. The script then has to be restarted manually to resolve this problem. |
I don't think that debug prints may fully help, I mean by using WireShark you are sure that Discordia does not do anything to reconnect. |
Sounds like my exact issue, would you happen to be running your bot on windows server too? |
Debian, on a pi to be exact. It's very rare, and again, the last line in the log is the "discord requested a re-connection" thing. It seems to be different to your issue as yours claims it has established a connection while mine doesn't. If I had to make a guess, I'd say that when discord requests a re-connection, and your internet cuts out in that exact moment, the script gets confused, tries to establish a connection a few times, and then just gives up, and doesn't care about your internet working again at one point. My internet resets daily and the timestamps seem to match. |
If it had connection related issues, it would show an error like |
Just installed Discordia and Luvit recently to work on a bot, and I've been getting a strange issue. The bot will randomly go offline after a few hours and when I check the console I will see that discord requested a reconnection and the bot claims to have reconnected. However, the bot does not seem to have actually reconnected properly as it will not respond to any chat commands and appears offline in the member list.
Below are 2 examples of my console before my bot stopped responding entirely and went offline in the message list.
The text was updated successfully, but these errors were encountered: