-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 connected to Discord more than 1000 times within a short time period. #3353
Comments
Can you show the bot logs please? ( |
Just wanna see which error is getting raised causing your reconnect problem. So you can just share the link provided by the bot. |
2024-11-02 00:00:20 core.models[324] - INFO: Discord logging level: INFO. I don't run NPM or Nodejs modules on reboot just to avoid exploits so that's why this is an issue as this program is looking for services that I don't have setup to auto for example mongodb this is my own insanity but it would just be nice to not have the bot contact discord before mongodb |
PM2 supports (exponential) restart delay and Plus, even if we check the DB before connecting to Discord, it still won't change the fact your app will restart many times a second without the delay so it's already counter intuitive to implement this in your case. ^But this is just my opinion, the devs may disagree |
You're right it's not needed nor is it a bug but it still would be nice to have a check to just to ensure if there is an issue that it won't continue to allow pm2 to hammer discords server. And yes pm2 is delayed it just doesn't matter when I have no clue there is an issue because the bot goes online before it connects to mongodb Other solution would be if there is a way to have the bot send a message in discord that there was an issue starting. If this is already a feature lmk so I can enable it lol |
Is your feature request related to a problem? Please elaborate.
Bot connected to Discord more than 1000 times within a short time period. PM2 will forever just keep spinning back up the bot without any care about the past issue.
Describe the solution you'd like
This is more so just a heads up but the bot has no stop point and will forever keep trying to reconnect even if the mongodb database is down causing the token to get revoked. There really should be some sort of pause if there is a error log preventing connection to mongodb otherwise PM2 May forever keep spinning it back up and causing it to timeout every 30 seconds.
Does your solution involve any of the following?
Describe alternatives you've considered
Turning back on my mongodb server and just resetting my token and accepting it lmfao
The other option instead of adding a check for past timeout reason is to check for mongodb before contacting discord servers as if there is no DB no need to contact discord as the bot will restart on timeout.
Who will this benefit?
Dumbasses like me who deploy everything at home and when there power goes out and forget to spin back up the DB lol
Additional Information
No response
The text was updated successfully, but these errors were encountered: