get-got / discord-downloader-go

A Discord bot program to download and otherwise handle files sent in Discord channels with extensive configuration. Can be used as a genuine Discord Bot or user account / self-bot
MIT License
277 stars 31 forks source link

Seemingly random discord gate-way timeouts #77

Closed Twinki14 closed 1 year ago

Twinki14 commented 1 year ago

Below is a log over 12-24 hours of the bot running, showing random gateway timeouts and attempts to resume working. Those attempts eventually fail after another gateway related error, causing the bot to completely stop listening for new files in channels.

This is a docker-hosted image, eventually forcing me to restart the container.

2022/11/01 18:37:32 history.go:303: [History] 990653720016584765/"Twinki"#0001: Finished history, 12 files
2022/11/02 10:19:41 logging.go:63: [DG1] wsapi.go:229:listen() error reading from gateway wss://gateway.discord.gg/?v=6&encoding=json websocket, websocket: close 1006 (abnormal closure): unexpected EOF
2022/11/02 14:19:42 logging.go:63: [DG1] wsapi.go:229:listen() error reading from gateway wss://gateway.discord.gg/?v=6&encoding=json websocket, read tcp 172.19.0.2:57482->162.159.135.234:443: read: connection reset by peer
2022/11/02 14:19:47 main.go:381: Bot encountered a gateway error: GATEWAY: ,    ERR: Get "https://discord.com/api/v6/gateway": read tcp 172.19.0.2:42292->162.159.137.232:443: read: connection reset by peer
2022/11/02 14:19:47 main.go:382: Closing Discord connections...
2022/11/02 14:19:48 main.go:386: Discord connections closed!
2022/11/02 14:19:48 main.go:387: Logging in...
2022/11/02 14:19:48 main.go:515: [Discord] Connecting to Discord via Token...
2022/11/02 14:19:48 main.go:559: [Discord] Logged into "CatboyMaid"#3404
2022/11/02 14:19:48 main.go:561: [Discord] This is a Bot User
2022/11/02 14:19:48 main.go:562: [Discord] - Status presence details are limited.
2022/11/02 14:19:48 main.go:563: [Discord] - Access is restricted to servers you have permission to add the bot to.
2022/11/02 14:19:48 main.go:389: Reconnected! The bot *should* resume working...
2022/11/02 14:19:49 discord.go:412: [Debug] Sending log for startup to admin channel 965375600393076798
2022/11/02 14:23:17 main.go:381: Bot encountered a gateway error: GATEWAY: ,    ERR: Get "https://discord.com/api/v6/gateway": read tcp 172.19.0.2:34838->162.159.128.233:443: read: connection reset by peer
2022/11/02 14:23:17 main.go:382: Closing Discord connections...
2022/11/02 14:23:18 main.go:386: Discord connections closed!
2022/11/02 14:23:18 main.go:387: Logging in...
2022/11/02 14:23:18 main.go:515: [Discord] Connecting to Discord via Token...
2022/11/02 14:23:18 main.go:559: [Discord] Logged into "CatboyMaid"#3404
2022/11/02 14:23:18 main.go:561: [Discord] This is a Bot User
2022/11/02 14:23:18 main.go:562: [Discord] - Status presence details are limited.
2022/11/02 14:23:18 main.go:563: [Discord] - Access is restricted to servers you have permission to add the bot to.
2022/11/02 14:23:18 main.go:389: Reconnected! The bot *should* resume working...
2022/11/02 14:23:19 discord.go:412: [Debug] Sending log for startup to admin channel 965375600393076798
2022/11/02 16:32:19 logging.go:63: [DG1] wsapi.go:229:listen() error reading from gateway wss://gateway.discord.gg/?v=6&encoding=json websocket, websocket: close 1001 (going away)
2022/11/02 17:14:44 logging.go:63: [DG1] wsapi.go:229:listen() error reading from gateway wss://gateway.discord.gg/?v=6&encoding=json websocket, websocket: close 1006 (abnormal closure): unexpected EOF
2022/11/02 17:35:47 logging.go:63: [DG1] wsapi.go:229:listen() error reading from gateway wss://gateway.discord.gg/?v=6&encoding=json websocket, websocket: close 1006 (abnormal closure): unexpected EOF
2022/11/02 18:05:09 logging.go:63: [DG1] wsapi.go:229:listen() error reading from gateway wss://gateway.discord.gg/?v=6&encoding=json websocket, websocket: close 1006 (abnormal closure): unexpected EOF
2022/11/02 20:19:26 discord.go:412: [Debug] Sending log for exit to admin channel 965375600393076798
2022/11/02 20:19:26 main.go:502: [Discord] Logging out of discord...
2022/11/02 20:19:27 main.go:505: [Database] Closing database...
2022/11/02 20:19:27 main.go:508: Exiting...