Allocate SSL session ctx memory under the handler to avoid thread safety issues