Firstly
EaseUp.
Why do you think it is hanging during commit? Do you have any logs that tells you that way?
What is the transaction timeout that you have set for the transaction?
Can it be so that there is a lot of network latency and because of that the process is just taking time and there is nothing wrong? If that is the case, then probably you can either increase the timeout period or debug the reason for the latency.