Spawn sub-process in a new thread to avoid issues generated by inner transactions