(Discord.py) ConnectionResetError: [Errno 104]












1















so I have a discord bot in legacy discord.py, not rewrite, and in the console, all I get is errors like "ConnectionResetError: [Errno 104] Connection reset by peer" and "Task exception was never retrieved". When I get too many of them my bot seems to dop connection then I have to restart the bot. I don't know how I can fix this so I came onto StackOverflow to see if there is someone who can help me. Thank you.



Also, this is on an Ubuntu 18.04 VPS.
This is what the console gets spammed with:



Task exception was never retrieved
future: <Task finished coro=<WebSocketCommonProtocol.run() done, defined at /home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py:428> exception=ConnectionResetError(104, 'Connection reset by peer')>
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 434, in run
msg = yield from self.read_message()
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 456, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 511, in read_data_frame
frame = yield from self.read_frame(max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 546, in read_frame
self.reader.readexactly, is_masked, max_size=max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/framing.py", line 86, in read_frame
data = yield from reader(2)
File "/usr/lib/python3.6/asyncio/streams.py", line 674, in readexactly
yield from self._wait_for_data('readexactly')
File "/usr/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
yield from self._waiter
File "/usr/lib/python3.6/asyncio/selector_events.py", line 725, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer









share|improve this question























  • "Connection reset by peer" means exactly that. The peer (the computer your computer is talking to , aka Discord) reset (closed) your connection. Do you have a long-running synchronous process that doesn't yield control back to the event loop?

    – Patrick Haugh
    Nov 21 '18 at 22:46











  • You have given me an idea, thank you for telling me that it could be a long running process.

    – Clawifier
    Nov 21 '18 at 23:55
















1















so I have a discord bot in legacy discord.py, not rewrite, and in the console, all I get is errors like "ConnectionResetError: [Errno 104] Connection reset by peer" and "Task exception was never retrieved". When I get too many of them my bot seems to dop connection then I have to restart the bot. I don't know how I can fix this so I came onto StackOverflow to see if there is someone who can help me. Thank you.



Also, this is on an Ubuntu 18.04 VPS.
This is what the console gets spammed with:



Task exception was never retrieved
future: <Task finished coro=<WebSocketCommonProtocol.run() done, defined at /home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py:428> exception=ConnectionResetError(104, 'Connection reset by peer')>
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 434, in run
msg = yield from self.read_message()
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 456, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 511, in read_data_frame
frame = yield from self.read_frame(max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 546, in read_frame
self.reader.readexactly, is_masked, max_size=max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/framing.py", line 86, in read_frame
data = yield from reader(2)
File "/usr/lib/python3.6/asyncio/streams.py", line 674, in readexactly
yield from self._wait_for_data('readexactly')
File "/usr/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
yield from self._waiter
File "/usr/lib/python3.6/asyncio/selector_events.py", line 725, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer









share|improve this question























  • "Connection reset by peer" means exactly that. The peer (the computer your computer is talking to , aka Discord) reset (closed) your connection. Do you have a long-running synchronous process that doesn't yield control back to the event loop?

    – Patrick Haugh
    Nov 21 '18 at 22:46











  • You have given me an idea, thank you for telling me that it could be a long running process.

    – Clawifier
    Nov 21 '18 at 23:55














1












1








1








so I have a discord bot in legacy discord.py, not rewrite, and in the console, all I get is errors like "ConnectionResetError: [Errno 104] Connection reset by peer" and "Task exception was never retrieved". When I get too many of them my bot seems to dop connection then I have to restart the bot. I don't know how I can fix this so I came onto StackOverflow to see if there is someone who can help me. Thank you.



Also, this is on an Ubuntu 18.04 VPS.
This is what the console gets spammed with:



Task exception was never retrieved
future: <Task finished coro=<WebSocketCommonProtocol.run() done, defined at /home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py:428> exception=ConnectionResetError(104, 'Connection reset by peer')>
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 434, in run
msg = yield from self.read_message()
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 456, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 511, in read_data_frame
frame = yield from self.read_frame(max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 546, in read_frame
self.reader.readexactly, is_masked, max_size=max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/framing.py", line 86, in read_frame
data = yield from reader(2)
File "/usr/lib/python3.6/asyncio/streams.py", line 674, in readexactly
yield from self._wait_for_data('readexactly')
File "/usr/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
yield from self._waiter
File "/usr/lib/python3.6/asyncio/selector_events.py", line 725, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer









share|improve this question














so I have a discord bot in legacy discord.py, not rewrite, and in the console, all I get is errors like "ConnectionResetError: [Errno 104] Connection reset by peer" and "Task exception was never retrieved". When I get too many of them my bot seems to dop connection then I have to restart the bot. I don't know how I can fix this so I came onto StackOverflow to see if there is someone who can help me. Thank you.



Also, this is on an Ubuntu 18.04 VPS.
This is what the console gets spammed with:



Task exception was never retrieved
future: <Task finished coro=<WebSocketCommonProtocol.run() done, defined at /home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py:428> exception=ConnectionResetError(104, 'Connection reset by peer')>
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 434, in run
msg = yield from self.read_message()
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 456, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 511, in read_data_frame
frame = yield from self.read_frame(max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/protocol.py", line 546, in read_frame
self.reader.readexactly, is_masked, max_size=max_size)
File "/home/ubuntu/.local/lib/python3.6/site-packages/websockets/framing.py", line 86, in read_frame
data = yield from reader(2)
File "/usr/lib/python3.6/asyncio/streams.py", line 674, in readexactly
yield from self._wait_for_data('readexactly')
File "/usr/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
yield from self._waiter
File "/usr/lib/python3.6/asyncio/selector_events.py", line 725, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer






python python-3.x discord discord.py






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 '18 at 21:39









ClawifierClawifier

62




62













  • "Connection reset by peer" means exactly that. The peer (the computer your computer is talking to , aka Discord) reset (closed) your connection. Do you have a long-running synchronous process that doesn't yield control back to the event loop?

    – Patrick Haugh
    Nov 21 '18 at 22:46











  • You have given me an idea, thank you for telling me that it could be a long running process.

    – Clawifier
    Nov 21 '18 at 23:55



















  • "Connection reset by peer" means exactly that. The peer (the computer your computer is talking to , aka Discord) reset (closed) your connection. Do you have a long-running synchronous process that doesn't yield control back to the event loop?

    – Patrick Haugh
    Nov 21 '18 at 22:46











  • You have given me an idea, thank you for telling me that it could be a long running process.

    – Clawifier
    Nov 21 '18 at 23:55

















"Connection reset by peer" means exactly that. The peer (the computer your computer is talking to , aka Discord) reset (closed) your connection. Do you have a long-running synchronous process that doesn't yield control back to the event loop?

– Patrick Haugh
Nov 21 '18 at 22:46





"Connection reset by peer" means exactly that. The peer (the computer your computer is talking to , aka Discord) reset (closed) your connection. Do you have a long-running synchronous process that doesn't yield control back to the event loop?

– Patrick Haugh
Nov 21 '18 at 22:46













You have given me an idea, thank you for telling me that it could be a long running process.

– Clawifier
Nov 21 '18 at 23:55





You have given me an idea, thank you for telling me that it could be a long running process.

– Clawifier
Nov 21 '18 at 23:55












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420836%2fdiscord-py-connectionreseterror-errno-104%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420836%2fdiscord-py-connectionreseterror-errno-104%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?