bigger connection pool, for Vangelis

This commit is contained in:
Noah Levitt 2019-05-15 16:06:42 -07:00
parent bbf3fad1dc
commit 8c31ec2916
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ except:
setuptools.setup(
name='warcprox',
version='2.4.13',
version='2.4.14',
description='WARC writing MITM HTTP/S proxy',
url='https://github.com/internetarchive/warcprox',
author='Noah Levitt',

View File

@ -274,7 +274,7 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler):
'''
self._conn_pool = self.server.remote_connection_pool.connection_from_host(
host=self.hostname, port=int(self.port), scheme='http',
pool_kwargs={'maxsize': 6, 'timeout': self._socket_timeout})
pool_kwargs={'maxsize': 12, 'timeout': self._socket_timeout})
self._remote_server_conn = self._conn_pool._get_conn()
if is_connection_dropped(self._remote_server_conn):
@ -759,7 +759,7 @@ class SingleThreadedMitmProxy(http_server.HTTPServer):
self.bad_hostnames_ports_lock = RLock()
self.remote_connection_pool = PoolManager(
num_pools=max(round(options.max_threads / 6), 200) if options.max_threads else 200)
num_pools=max((options.max_threads or 0) // 6, 400))
if options.onion_tor_socks_proxy:
try: