Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/Error: connectionreseterror errno 54 connection reset by peer – quick tips
Next
Answered
Blair Morton
  • 17
Blair Morton
Asked: May 18, 20222022-05-18T21:19:00+00:00 2022-05-18T21:19:00+00:00In: python

Error: connectionreseterror errno 54 connection reset by peer – quick tips

  • 17

. Advertisement .

..3..

. Advertisement .

..4..

I get an error

Exception happened during processing of request from ('127.0.0.1', 57917)
 Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 650, in process_request_thread
  self.finish_request(request, client_address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request
  self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in __init__
  self.handle()
  File "/Users/ryan/.local/share/virtualenvs/portal-2PUjdB8V/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 171, in handle
  self.handle_one_request()
  File "/Users/ryan/.local/share/virtualenvs/portal-2PUjdB8V/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 179, in handle_one_request
  self.raw_requestline = self.rfile.readline(65537)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
  return self._sock.recv_into(b)
 ConnectionResetError: [Errno 54] Connection reset by peer

when trying to start to use app for my project. How to fix the connectionreseterror errno 54 connection reset by peer error? Please give me some advice.

errno 54 connection reset by peer
  • 2 2 Answers
  • 279 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-05T03:38:54+00:00Added an answer on June 5, 2022 at 3:38 am

    The cause:

    This error happens because the issue is trying to provide static files through development server with debug settings to False, but the static files only can be served by the development server  when in settings file debug is set to True.

    Solution: Below is the way I resolved my problem:

    First, I used:

    DEBUG = False

    instead of

    DEBUG = True

    Then I restarted development server and it worked fine.

    • 12
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Josie Martin
    2022-05-26T04:10:25+00:00Added an answer on May 26, 2022 at 4:10 am

    If the favicon’s format is.png, it will display the same behavior as.ico.

    Contrary to what is being suggested on other sites, downgrading Python from v3.6 will not fix the problem. Screenshot of error w.. png Favicon

    This seems to be a Django problem. It will likely be fixed permanently in a future Django version.

    Following https://bugs.python.org/issue27682#msg348302 I made the changes shown: connectionreseterror%20errno%2054%20connection%20reset%20by%20peer

    I then replaced BrokenPipeError with ConnectionAbortedError. This seems to have fixed the exception.

    Update for Django 3 – I made the following changes to basehttp.py (rev.1.2.1) in order to eliminate all broken pipe error messages

    Line 55: - return issubclass(exc_type, BrokenPipeError)
    Line 55: + return issubclass(exc_type, (BrokenPipeError, ConnectionAbortedError, ConnectionResetError))
    
    Line 71: - logger.info("- Broken pipe from %s\n", client_address)
    Line 71: + pass
    • 17
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.