Влад Беляев
Влад Беляев

Reputation: 61

Django Connection reset by peer

I have a problem, when I try to render a video file in template

<video autoplay muted>
            <sourcesrc="{{ video.oblozka_video_file.url }}" poster="{{ video.oblozka_video_preview.url }}" type="video/mp4">
        </video>

Here is the traceback to my exception

    Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 86, in run
    self.finish_response()
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
    self.write(data)
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 217, in write
    self._write(data)
  File "/usr/lib/python2.7/socket.py", line 328, in write
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 104] Connection reset by peer
[19/May/2017 09:07:06] "GET /media/studios_videos/video/3/2/3e2df999-c34a-439b-b69a-94b4977a3d80.mp4 HTTP/1.1" 500 59
- Broken pipe from ('192.168.1.5', 55300)

Upvotes: 3

Views: 9584

Answers (2)

Slowloris
Slowloris

Reputation: 1

I got the same error, to fix it you should set the timeout, it is an ajax error mostly

timeout:3000,

Upvotes: 0

Adaikalaraj
Adaikalaraj

Reputation: 498

Try adding your SITE_URL in your settings.py

i.e If you are running in http://127.0.0.1:8000

SITE_URL = "http://127.0.0.1:8000"

Upvotes: 6

Related Questions