Skip to content

Commit d03af15

Browse files
committed
Explicit note on connection pool deadlock with REQUIRES_NEW
Closes gh-26250
1 parent d781f29 commit d03af15

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

framework-docs/modules/ROOT/pages/data-access/transaction/declarative/tx-propagation.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ status and with an inner transaction's locks released immediately after its comp
5959
Such an independent inner transaction can also declare its own isolation level, timeout,
6060
and read-only settings and not inherit an outer transaction's characteristics.
6161

62+
NOTE: The resources attached to the outer transaction will remain bound there while
63+
the inner transaction acquires its own resources such as a new database connection.
64+
This may lead to exhaustion of the connection pool and potentially to a deadlock if
65+
several threads have an active outer transaction and wait to acquire a new connection
66+
for their inner transaction, with the pool not being able to hand out any such inner
67+
connection anymore. Do not use `PROPAGATION_REQUIRES_NEW` unless your connection pool
68+
is appropriately sized, exceeding the number of concurrent threads by at least 1.
69+
6270
[[tx-propagation-nested]]
6371
== Understanding `PROPAGATION_NESTED`
6472

0 commit comments

Comments
 (0)