ClusterHQ / flocker

Container data volume manager for your Dockerized application

Home Page:https://clusterhq.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intermittent User timeout caused connection failure.

gufranmmu opened this issue · comments

I was running some test to run one docker container to run between two nodes in a loop.

while true; do time sudo ansible --private-key=/root/ee86.pem -i development.hosts  mesos-slave-3  -m shell -a "docker run --privileged --security-opt apparmor=unconfined -d -v flocker-test-volume-5:/data --volume-driver=flocker busybox echo flocker-test"; sleep 2; time sudo ansible --private-key=/root/ee86.pem -i development.hosts  mesos-slave-1  -m shell -a "docker run --privileged --security-opt apparmor=unconfined -d -v flocker-test-volume-5:/data --volume-driver=flocker busybox echo flocker-test"; done;

Sometimes i get User Timeout caused connection failure error.

mesos-slave-1 | FAILED | rc=125 >>
d7664e6667f57033b210380264814a2e67be8a20b50dde1d0440c8ce10f1b51fdocker: Error response from daemon: **TimeoutError: User timeout caused connection failure..**

real    0m31.059s
user    0m0.214s
sys     0m0.057s

mesos-slave-1 | success | rc=0 >>
4ab79b07b2e54751ba724809c669096dd5886cebfa92a376079b55b124a0a822

real    0m21.264s
user    0m0.268s
sys     0m0.065s

Is there any way to increase the timeout for "flocker:apiclient:http_request" ?

scrappy has the option: http://stackoverflow.com/questions/18686251/scrapy-user-timeout-caused-connection-failure

Something similar in twisted: https://twistedmatrix.com/trac/ticket/3450

@gufranmmu note that depending on your backend, the loops to move the volumes from one node to another could take tens of seconds. so sleep 2 is likely not enough time and therefore you may be calling a docker daemon that is still blocked/waiting for a volume movement.