Closed L235 closed 2 years ago
Hm, the restart is not working:
2022-08-30 07:21:58 ERROR Task exception was never retrieved
future: <Task finished name='Task-5' coro=<BasicClient.handle_forever() done, defined at /data/project/hat-collector/.local/share/virtualenvs/hat-collector-beta-Vi1f6vgq/lib/python3.9/site-packages/pydle/client.py:363> exception=SSLError(1, '[SSL: APPLICATION_DATA_AFTER_CLOSE_NOTIFY] application data after close notify (_ssl.c:2745)')>
Traceback (most recent call last):
File "/data/project/hat-collector/.local/share/virtualenvs/hat-collector-beta-Vi1f6vgq/lib/python3.9/site-packages/pydle/client.py", line 367, in handle_forever
data = await self.connection.recv(timeout=self.READ_TIMEOUT)
File "/data/project/hat-collector/.local/share/virtualenvs/hat-collector-beta-Vi1f6vgq/lib/python3.9/site-packages/pydle/connection.py", line 115, in recv
return await asyncio.wait_for(self.reader.readline(), timeout=timeout)
File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
return fut.result()
File "/usr/lib/python3.9/asyncio/streams.py", line 540, in readline
line = await self.readuntil(sep)
File "/usr/lib/python3.9/asyncio/streams.py", line 632, in readuntil
await self._wait_for_data('readuntil')
File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/lib/python3.9/asyncio/sslproto.py", line 528, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/lib/python3.9/asyncio/sslproto.py", line 206, in feed_ssldata
self._sslobj.unwrap()
File "/usr/lib/python3.9/ssl.py", line 948, in unwrap
return self._sslobj.shutdown()
ssl.SSLError: [SSL: APPLICATION_DATA_AFTER_CLOSE_NOTIFY] application data after close notify (_ssl.c:2745)
I have determined that the proximate cause of the Excess Flood (pydle.features.rfc1459.protocol.ServerError: Closing Link: wikimedia/bot/hat-collector (Excess Flood)
) was having too many channels all at once at the beginning. Joining 21 channels was OK; 22 caused the Excess Flood error.
I've added rate limiting to sync_channels() on the branch
Done better in #30
I'm gonna chalk the bot's failure to recover from the exception to the specifics of the Excess Flood, not the bot's general failure to try to reconnect. I think we can therefore close this.
Describe the bug A clear and concise description of what the bug is.
To reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Console output If available, add console output.
Environment:
Additional context Add any other context about the problem here.