Episerver Scheduled Mirroring Job Error: The connection was closed unexpectantly

  • Updated

If the following error occurs during mirroring see below for a potential solution.

Failure during export: The underlying connection was closed: The connection was closed unexpectantly

This is likely due to a timeout.

  1. First to verify it is a timeout issue try reducing the amount of data moved by mirroring. To do that deleting the existing mirroring configurations(after noting their settings) in the mirroring configuration  found at admin > config > mirroring.
  2. Then create a mirroring profile which includes a small subset of the existing items. 
  3. If the mirroring job completes, the issue is most likely the timeout issue. If so see the next steps, otherwise implement log4net logging and contact support if needed. For the logging copy the episerverlog.config from the CMS site to the mirroring site folder and change the log levels to DEBUG
  4. Increase the following values.
    <mirroringservicefolder>\web.config sendTimeout
    The connectionTimeout and idle timeout settings in the advanced settings of the application pool for both the mirroring and CMS sites on both sides of the mirroring.
  5. Again if this fails to resolve the issue implement logging and contact support as necessary.