ThePooN / bancho.js

Interface with Bancho over IRC, made easy and reliable.
https://bancho.js.org
GNU General Public License v3.0
57 stars 6 forks source link

Crash on DNS request failure #12

Closed kiwec closed 3 years ago

kiwec commented 3 years ago

Looks like this afternoon, either osu's dns servers were down, or hetzner cloud had connection issues. As a result, this happened :

events.js:174                                                                                             
      throw er; // Unhandled 'error' event
      ^                                                                                                  

Error: getaddrinfo EAI_AGAIN osu.ppy.sh osu.ppy.sh:443                                                   
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)                                        Emitted 'error' event at:                           
    at TLSSocket.socketErrorListener (_http_client.js:401:9)                                             
    at TLSSocket.emit (events.js:198:13)                                                                 
    at emitErrorNT (internal/streams/destroy.js:91:8)                                                    
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)                                             
    at process._tickCallback (internal/process/next_tick.js:63:19)

I'm not really sure how to handle it?

ThePooN commented 3 years ago

Well, I'm not sure what can be done from bancho.js's end here, unless this is an uncaught Promise rejection (ie. an error you cannot catch) or if it leaves bancho.js in an unusable state (a failing API request should definitely not).

Both CloudFlare and osu! have no incident to report today. If you have spotty DNS, please consider using other DNS servers (such as Google or CloudFlare), or/and get a DNS cache service on your server (such as dnsmasq).