#Discord bots suddenly crash/restart (PM2)
1 messages · Page 1 of 1 (latest)
also 413 Request Entity Too Large error is telling you the image is too large to be uploaded
Hello. It seems like your discord bot is using too much interactions, so discord is rate limiting it. One of the solutions, is too verify your bot (but only if it is publick). Either, try creating a new bot client in developer portal.
- verifying will do nothing if he is being rate limited
In addition, the 413 Request Entity Too Large traceback, is telling you, that the image the user is trying to upload is too large.
It will reduce limits, but ofc not delete them.
post the underneath as well
no it won't.
I was the owner of a verified bot, and i know it.
However it was ~1 year ago, so smth might have changed, so i can be wrong
getting your bot verified does not reduce your rate limits and it never has.
this may be a connection issue? does your internet go in and out?
ahhh vps. hmm
yeah my best guess would be some connection issue and the bot just never reconnects
well the others could be disconnecting as well just they reconnect
hard to tell with a generic error message like so tho
That name resolution line sounds like DNS to me.
Can you run nslookup discord.com from command line on the VPS?
yea
Well the IP was resolved.
Meaning discord.com was correctly mapped to 162.159.128.223
All of those are accurate.
So it's intermittent?
Or did it just happen and you can no longer get the bot to connect
Try nslookup cdn.discordapp.com
Yeah, it looks fine.
It must be something causing the random drops. Becuase those logs are when you're trying to get an attachment from on_message and it's not able to resolve cdn.discordapp.com/xxxx
Okay, so maybe someone is sending a file that crashes the bot?
We have it setup so it only accepts attachment files from people. All messages will just be ignored
Not necessarily.
The issue is with the bot trying to download the attachment.
Which it needs to grab from the cdn.
Not likely a discord issue.
It's a network issue from your host.
Becuase it looks like it's using it's own DNS
I'd see if you can change to something like Cloudflare (1.1.1.1 , 1.0.0.1) , Google (8.8.8.8, 8.8.4.4), or OpenDns (208.67.220.220, 208.67.222.222)
You can do it via cli
can you access and edit etc/resolv.conf?
You should be able to do to:
nano /etc/resolv.conf - which, if nano is installed, should open a simple text editor
From there you can alter the nameservers
If nano isn't installed you can try vim in place of nano but I'm not well-versed on Vim currently.
Sure.
I've messed with linux a bit, just never really in the context of a VPS, so I don't know what they might have going on that might not even care about your changes.
false
discord doesnt ratelimit interaction endpoints
cloudflare does only if payload validation fails
does it reduce limits on verified bot?
if your bot is in >150,000 guilds then you can contact support so they will reduce ratelimits
got it
but it gives me this warning here