Skip to content

Commit 45321c2

Browse files
authored
Adjust the number of single-process database connections in the pypy environment.
1 parent 37dd817 commit 45321c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frameworks/Python/blacksheep/app-socketify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
ADDITIONAL_ROW = [0, "Additional fortune added at request time."]
1515
CORE_COUNT = multiprocessing.cpu_count()
1616

17-
MAX_POOL_SIZE = CORE_COUNT * 2
17+
MAX_POOL_SIZE = min(CORE_COUNT * 2, MAX_DB_CONNECTIONS // CORE_COUNT, 32)
1818
MIN_POOL_SIZE = max(1, MAX_POOL_SIZE // 2)
1919
db_pool = None
2020

0 commit comments

Comments
 (0)