When is a connection to the postgres DB closed when you do a retrieve or commit in a microflow.

0
Hi All When is a connection to the postgres DB closed when you do a retrieve or commit in a microflow. Is it closed directly after the retrieve or is it felt open until the microflow is committed or finishes? We run scheduled tasks with queues and we are running out of db connections. We would like to fix this by hitting the db less and closing the connections faster, rather than throwing memory at it. I have gone through the learning path about this but i would like to hear it from the horses mouth. :-) Regards, Patrick    
asked
2 answers
2

The transaction will end when the originating microflow end.

If you need to, you can force a transaction to end via java (community commons should have that action). But you should be really carefull with these things if you don’t exactly know what you’re doing.

I’d recommend this learning path

https://gettingstarted.mendixcloud.com/link/path/51

regards, Fabian

answered
0

I find it liberating that Mendix does not bother you to much with when to open or close a db connection. Personally i would just raise the connection pool size and let Mendix handle the rest.

Cheers,

Michiel

answered