Skip to content

Commit e1925ed

Browse files
authored
fix: increase the connection pool size (#25)
* fix: increase the connection pool size * plus 10 for safety * code format
1 parent 99c181e commit e1925ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jquantsapi/client.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ def _request_session(
6565
status_forcelist=status_forcelist,
6666
method_whitelist=method_whitelist,
6767
)
68-
adapter = HTTPAdapter(max_retries=retry_strategy)
68+
adapter = HTTPAdapter(
69+
# 安全のため並列スレッド数に更に10追加しておく
70+
pool_connections=self.MAX_WORKERS + 10,
71+
pool_maxsize=self.MAX_WORKERS + 10,
72+
max_retries=retry_strategy,
73+
)
6974
self._session = requests.Session()
7075
self._session.mount("https://", adapter)
7176

0 commit comments

Comments
 (0)