Merge pull request #29 from pokoli/pool_maxsize
Use a higher value for connecion_pool_maxsize.
This commit is contained in:
commit
84d1284c9a
@ -20,6 +20,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import multiprocessing
|
||||
import logging
|
||||
import sys
|
||||
|
||||
@ -83,11 +84,12 @@ class ConfigurationObject(object):
|
||||
# Set this to True/False to enable/disable SSL hostname verification.
|
||||
self.assert_hostname = None
|
||||
# urllib3 connection pool's maximum number of connections saved
|
||||
# per pool. Increasing this is useful for cases when you are
|
||||
# making a lot of possibly parallel requests to the same host,
|
||||
# which is often the case here.
|
||||
# When set to `None`, will default to whatever urllib3 uses
|
||||
self.connection_pool_maxsize = None
|
||||
# per pool. urllib3 uses 1 connection as default value, but this is
|
||||
# not the best value when you are making a lot of possibly parallel
|
||||
# requests to the same host, which is often the case here.
|
||||
# cpu_count * 5 is used as default value to increase performance
|
||||
# This is used because it's the default value for ThreadPoolExecutor
|
||||
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
|
||||
# http proxy setting
|
||||
self.http_proxy_url = None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user