Move session creation out of worker threads: the session open can race with connection close.