Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Random "Enlisted connection used without active transaction" errors

Tags:

quarkus

agroal

In my Quarkus app I get Enlisted connection used without active transaction errors around once a day (on a public API used quite a lot).

It seems to come from Agroal (here https://github.com/agroal/agroal/blob/master/agroal-pool/src/main/java/io/agroal/pool/ConnectionHandler.java#L393).

According to the stack trace it fails at various places in REST endpoints annotated with @Transactional.

In PostgreSQL I only get the following:

ERROR:  canceling statement due to user request
like image 493
Benjamin Gamard Avatar asked Aug 12 '26 11:08

Benjamin Gamard


1 Answers

I worked around this issue by firing an event which is listened in a TransactionPhase.AFTER_SUCCESS method (and this method send the Kafka message).

like image 111
Benjamin Gamard Avatar answered Aug 17 '26 12:08

Benjamin Gamard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!