- Saved searches
- Use saved searches to filter your results more quickly
- Shard connection crash «cannot write to closing transport» #6033
- Shard connection crash «cannot write to closing transport» #6033
- Comments
- Saved searches
- Use saved searches to filter your results more quickly
- ConnectionResetError being output in normal, expected situations #3178
- ConnectionResetError being output in normal, expected situations #3178
- Comments
- Long story short
- Expected behaviour
- Actual behaviour
- Steps to reproduce
- Your environment
- Saved searches
- Use saved searches to filter your results more quickly
- Handle ConnectionResetError #3648
- Handle ConnectionResetError #3648
- Comments
- Long story short
- Expected behaviour
- Actual behaviour
- Steps to reproduce
- Your environment
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shard connection crash «cannot write to closing transport» #6033
Shard connection crash «cannot write to closing transport» #6033
Comments
I have 3 shards. The 3rd crashes with the error in the picture.
If I start the shard, it will run and crash after some time.
I don’t know how to reproduce it, it happens randomly. Most of the time with this shard. I am using the latest version of d.py, python 3.8.2 on debian 10 and run multiple Bots on my server. I use the AutoShardedBot.
I use the Members intent.
The text was updated successfully, but these errors were encountered:
Is it possible for you to get the traceback log in text form? This image of the traceback seems to be only a fraction of it.
No sorry not possible ☹️ . Sometimes the shard just stops and sends «Killed» without and Exception, most of the time this exception occurs.
@NCPlayz here is the complete traceback: 2-sharded bot went offline, but still running on my vps, then this was the log:
ConnectionResetError: Cannot write to closing transport
Task exception was never retrieved
future: exception=ConnectionResetError(‘Cannot write to closing transport’)>
Traceback (most recent call last):
File «/usr/local/lib/python3.8/site-packages/discord/state.py», line 824, in chunk_guild
await self.chunker(guild.id, nonce=request.nonce)
File «/usr/local/lib/python3.8/site-packages/discord/state.py», line 1121, in chunker
await ws.request_chunks(guild_id, query=query, limit=limit, nonce=nonce)
File «/usr/local/lib/python3.8/site-packages/discord/gateway.py», line 658, in request_chunks
await self.send_as_json(payload)
File «/usr/local/lib/python3.8/site-packages/discord/gateway.py», line 596, in send_as_json
await self.send(utils.to_json(data))
File «/usr/local/lib/python3.8/site-packages/discord/gateway.py», line 592, in send
await self.socket.send_str(data)
File «/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py», line 150, in send_str
await self._writer.send(data, binary=False, compress=compress)
File «/usr/local/lib/python3.8/site-packages/aiohttp/http_websocket.py», line 687, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File «/usr/local/lib/python3.8/site-packages/aiohttp/http_websocket.py», line 598, in _send_frame
raise ConnectionResetError(«Cannot write to closing transport»)
ConnectionResetError: Cannot write to closing transport
Task exception was never retrieved
future: exception=ConnectionResetError(‘Cannot write to closing transport’)>
Traceback (most recent call last):
File «/usr/local/lib/python3.8/site-packages/discord/state.py», line 824, in chunk_guild
await self.chunker(guild.id, nonce=request.nonce)
File «/usr/local/lib/python3.8/site-packages/discord/state.py», line 1121, in chunker
await ws.request_chunks(guild_id, query=query, limit=limit, nonce=nonce)
File «/usr/local/lib/python3.8/site-packages/discord/gateway.py», line 658, in request_chunks
await self.send_as_json(payload)
File «/usr/local/lib/python3.8/site-packages/discord/gateway.py», line 596, in send_as_json
await self.send(utils.to_json(data))
File «/usr/local/lib/python3.8/site-packages/discord/gateway.py», line 592, in send
await self.socket.send_str(data)
File «/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py», line 150, in send_str
await self._writer.send(data, binary=False, compress=compress)
File «/usr/local/lib/python3.8/site-packages/aiohttp/http_websocket.py», line 687, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File «/usr/local/lib/python3.8/site-packages/aiohttp/http_websocket.py», line 598, in _send_frame
raise ConnectionResetError(«Cannot write to closing transport»)
ConnectionResetError: Cannot write to closing transport
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConnectionResetError being output in normal, expected situations #3178
ConnectionResetError being output in normal, expected situations #3178
Comments
Long story short
I am frequently seeing this message output from the aiohttp library.
Traceback (most recent call last):
File «/usr/local/lib64/python3.6/site-packages/aiohttp/web_protocol.py», line 398, in start
await resp.prepare(request)
File «/usr/local/lib64/python3.6/site-packages/aiohttp/web_response.py», line 300, in prepare
return await self._start(request)
File «/usr/local/lib64/python3.6/site-packages/aiohttp/web_response.py», line 605, in _start
return await super()._start(request)
File «/usr/local/lib64/python3.6/site-packages/aiohttp/web_response.py», line 367, in _start
await writer.write_headers(status_line, headers)
File «/usr/local/lib64/python3.6/site-packages/aiohttp/http_writer.py», line 100, in write_headers
self._write(buf)
File «/usr/local/lib64/python3.6/site-packages/aiohttp/http_writer.py», line 57, in _write
raise ConnectionResetError(‘Cannot write to closing transport’)
ConnectionResetError: Cannot write to closing transport
Expected behaviour
The library should automatically recover itself internally, or throw an error where my application code can handle it with a retry.
Actual behaviour
This error comes out in my logs and causes error detection systems to trigger.
Steps to reproduce
I don’t fully understand how to reproduce it, but it happens frequently in my application that uses aiohttp as a client. The library seems to recover from it.
Your environment
aiohttp (3.1.3) client on Fedora relesae 27, Python 3.6.4.
The text was updated successfully, but these errors were encountered:
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle ConnectionResetError #3648
Handle ConnectionResetError #3648
Comments
Long story short
There was introduced ConnectionResetError within #2989. What is the preferable way to handle this exception on the server side?
Expected behaviour
No exceptions or all exceptions are catched and handled.
Actual behaviour
Unhandled exception Traceback (most recent call last): File "/home/decaz/.virtualenvs/test-aiohttp/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 448, in start await resp.write_eof() File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/home/decaz/.virtualenvs/test-aiohttp/lib/python3.6/site-packages/aiohttp/web_response.py", line 444, in write_eof await self._payload_writer.write_eof(data) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/home/decaz/.virtualenvs/test-aiohttp/lib/python3.6/site-packages/aiohttp/http_writer.py", line 138, in write_eof self._write(chunk) File "/home/decaz/.virtualenvs/test-aiohttp/lib/python3.6/site-packages/aiohttp/http_writer.py", line 67, in _write raise ConnectionResetError('Cannot write to closing transport') ConnectionResetError: Cannot write to closing transport
Steps to reproduce
Close client connection while there is running coroutine on the server side.
Your environment
The text was updated successfully, but these errors were encountered: