gecko-dev/taskcluster
Gregory Szorc f434988215 Bug 1291035 - Increase HTTP connection pool capacity; r=dustin
I was looking at some decision task logs and noticed lines like:

  Connection pool is full, discarding connection: taskcluster

I also noticed lines like:

  Starting new HTTP connection (153): taskcluster

In this case, we had established 153 TCP connections to a server.

Looking at the requests source code, a requests.session by default
creates a connection pool with capacity of 10. There are actually 2
components to the capacity: idle connections and active connections.
What appeared to be happening was we could obtain an idle connection,
use it, and then it would be discarded when put back in the idle
pool because the idle pool was at capacity. Furthermore, it also
appears that connections were sitting around waiting for a TCP
connection.

This commit uses a custom "adapter" with an increased pool size that
matches the concurrency level of the code issuing the HTTP requests.
This should increase the number of concurrent TCP connections / requests,
decreease the number of TCP connections being used overall, and make
decision tasks complete faster.

MozReview-Commit-ID: 6NDbz78TM2y

--HG--
extra : rebase_source : a48e1dae31a5e2af2bc554b544a9019d50dc784f
2016-08-01 14:49:55 -07:00
..
ci Bug 1290620 - Implement a run-task wrapper script; r=dustin 2016-07-29 20:53:21 -07:00
docs Bug 1289643 - Change path for checkouts from "workspace" to "checkouts"; r=dustin 2016-07-29 10:44:19 -07:00
scripts Bug 1290685 - Update TaskCluster to use github.com for B2G.git r=garndt 2016-07-31 00:03:51 +02:00
taskgraph Bug 1291035 - Increase HTTP connection pool capacity; r=dustin 2016-08-01 14:49:55 -07:00
mach_commands.py Bug 1290620 - Make mach taskgraph honor mach logging settings; r=dustin 2016-07-29 20:37:42 -07:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00