Skip to content

Commit

Permalink
make URLLIB3_POOL_SIZE configurable (#128)
Browse files Browse the repository at this point in the history
Added flexibility for users to set the urllib3 connection pool size, this value can now be set in the range [10,100]
  • Loading branch information
sharmaharisam authored Dec 6, 2024
1 parent 881a57d commit d38f694
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/google/appengine/runtime/default_api_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,16 @@

URLLIB3_POOL_COUNT = 10

URLLIB3_POOL_SIZE = 10
POOL_SIZE_LOWER_LIMIT = 10
POOL_SIZE_UPPER_LIMIT = 100
POOL_SIZE_DEFAULT_VALUE = 10

URLLIB3_POOL_SIZE = int(
os.environ.get('POOL_SIZE_URLLIB3', POOL_SIZE_DEFAULT_VALUE)
)

if not (POOL_SIZE_LOWER_LIMIT <= URLLIB3_POOL_SIZE <= POOL_SIZE_UPPER_LIMIT):
URLLIB3_POOL_SIZE = POOL_SIZE_DEFAULT_VALUE



Expand Down

0 comments on commit d38f694

Please sign in to comment.