Expected behavior
Accessing resources served by flask app in the container should return files consistently 100% of the time instead of breaking the connection and resulting in errors randomly popping up.
Actual behavior
Files get corrupted / connections breaks (?) and aren’t served successfully resulting in net::ERR_CONTENT_LENGTH_MISMATCH
.
backend:
Error on request: Traceback (most recent call last): File "/dev/opt/dev_virtualenv/lib/python2.7/site-packages/werkzeug/serving.py", line 192, in run_wsgi execute(self.server.app) File "/dev/opt/dev_virtualenv/lib/python2.7/site-packages/werkzeug/serving.py", line 183, in execute write(data) File "/dev/opt/dev_virtualenv/lib/python2.7/site-packages/werkzeug/serving.py", line 151, in write self.send_header(key, value) File "/usr/lib/python2.7/BaseHTTPServer.py", line 401, in send_header self.wfile.write("%s: %s\r\n" % (keyword, value)) IOError: [Errno 32] Broken pipe
frontend: GET http://localhost:8080/... net::ERR_CONTENT_LENGTH_MISMATCH
Information
pinata:
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta13.1
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160530-173034.tar.gz
Most specific failure is: No error was detected
Your unique id is: D92B5831-73A3-4875-8919-87684385C690
Steps to reproduce the behavior
Unfortunately I don’t have an isolated use case because it happens a bit arbitrarily with main project and my attempts at isolation (small flask app) were unsuccessful.
Files are being served with flask’s dev server and on the server side I am getting:
Error on request: Traceback (most recent call last): File "/dev/opt/dev_virtualenv/lib/python2.7/site-packages/werkzeug/serving.py", line 192, in run_wsgi execute(self.server.app) File "/dev/opt/dev_virtualenv/lib/python2.7/site-packages/werkzeug/serving.py", line 183, in execute write(data) File "/dev/opt/dev_virtualenv/lib/python2.7/site-packages/werkzeug/serving.py", line 151, in write self.send_header(key, value) File "/usr/lib/python2.7/BaseHTTPServer.py", line 401, in send_header self.wfile.write("%s: %s\r\n" % (keyword, value)) IOError: [Errno 32] Broken pipe
while on the front end I am seeing GET http://localhost:8080/... net::ERR_CONTENT_LENGTH_MISMATCH
. It happens with requests to CSS and JS files, it happens to JSON data requests, etc.
I can confirm that this doesn’t happen neither when using our app in vagrant and nor with docker-machine (but that hasn’t been independently verified by me but reported by another developer), and it is reproducible by another developer using docker for mac so it’s not a problem isolated to my machine. It might be relatated to our docker configuration but AFAIK we don’t have anything that exotic, and if docker-machine works I don’t see it related to our dockerfile (but could be wrong).
At the moment I have no reliable way to reproduce except that with main container this happens often but not consistently enough (on a single resource, it happens on nearly every page load with one resource) to allow easy reproduction.