C# getCustomerProfileRequest - Underlying Connection was Closed
We have a long running process that calls getCustomerProfileRequest. At a random time during this process, the call fails with "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."
Is there a way to ensure the connection is not closed during the call? Is there a session limit/expiration that is not documented within the API? We are using the C# SDK for implementation.
This is only happening when querying the production environment, not our sandbox environment.