kumuluz / kumuluzee

Lightweight open-source framework for developing microservices using standard Java EE technologies and migrating Java EE to cloud-native architecture.
https://ee.kumuluz.com
MIT License
291 stars 71 forks source link

ARJUNA err when running out of resources #175

Closed eriskooo closed 4 years ago

eriskooo commented 4 years ago

Hello,

on heavy load we are noticing strange error's while performing DB operation

ARJUNA016102: The transaction is not active! Uid is 0:ffff0a2a0415:ae6d:5f2b723b:47c0e6

Is this domething common / described ? perhaps running out of pool connection ? (which would be strange, repository beans are application scoped)

thanks for any advice

gpor0 commented 4 years ago

Hello,

one of the reasons of inactive transaction is timeout when your queries towards persistence are slow. I believe transaction timeout is set to 60 seconds by default. Can you provide more information, do you have some kind of long running job?

eriskooo commented 4 years ago

Hello,

thank you for an answer -> actually it is one long term job, repeating steps for many times. I'll double check if all those steps are not in one transaction (should be not). Thank you for direction, I'll have a look !

gpor0 commented 4 years ago

Think again if you really need to do this in one transaction. You should know that database transactions containing a lot of operations are time consuming and require a lot of database and application resources (redo log, permgen, etc...), so split your job to multiple transactions if possible and solve this problem programatically. If you rewrite your big operation to smaller ones you can benefit from: