diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-06-08 15:18:00 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-06-08 15:57:12 -0300 |
commit | b67648aa666345b0800b48f6c203538b21c9a201 (patch) | |
tree | 84bd198ae75f6735b3370d5b594f32839af83900 /src/leap/common/testing/basetest.py | |
parent | 76436726663971ebd58bf2c758b52abb10f7c242 (diff) |
[bug] Makes request method respect a hard limit
Altough we specify maxPersistentPerHost, Twisted won't stop opening
connections after that. This limit is used just to keep the size of
persistent connections pool under control. Additional connections will be
made as non persistent. So, if we ask 10000 requests, it will open 10000
connections immediately and leave 10 open after all finished.
For checking this behavior, see getConnection from Twisted source:
http://twistedmatrix.com/trac/browser/tags/releases/twisted-15.2.1/twisted/web/client.py#L1203
I tested this by using http_target from soledad without a local database to
download all encrypted docs from one account with 1700 of them. The
program just hangs and crashes with 1000+ connections and "Too many
files open" warnings.
With this fix, it was able to download normally, respecting the
maxPersistentPerHost as a limiter. :)
Diffstat (limited to 'src/leap/common/testing/basetest.py')
0 files changed, 0 insertions, 0 deletions