I'm trying to run a discord node js server on a digital ocean droplet and seeing this error around 24 hours after launching the process. I believe it's crashing my app. Any idea what's going on and how to handle this?
I see it's a DNS lookup error, but I can't figure out what is causing it and how to safely keep the bot alive.
Error: getaddrinfo EAI_AGAIN discordapp.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {
errno: 'EAI_AGAIN',
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'discordapp.com',
request: ClientRequest {
.....
shouldKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
"logs.txt" 216L, 7582C 3,5 Top
[Symbol(connect-options)]: [Object]
},
Dt
'Host: discordapp.com
' +
'Authorization: XXXXXX +
'User-Agent: DiscordBot (https://github.com/discordjs/discord.js, 11.5.1) Node.js/v12.18.1
' +
'Content-Type: application/json
' +
'Accept-Encoding: gzip, deflate
' +
'Connection: keep-alive
' +
'Content-Length: 26
' +
'
',
_onPendingData: [Function: noopPendingOutput],
....
path: '/api/v7/channels/796972614174113792/messages',
....
}
}
question from:
https://stackoverflow.com/questions/65643912/intermittent-dns-failure-running-discord-bot-on-droplet 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…