locked
TeamFoundationServiceUnavailableException when migrating from TFS 2008 to 2010 when encounter large checkin (147 change actions) RRS feed

  • Question

  • All my other (10) projects migrated this is the last one I tried and wouldn't you know it I get this error.

    It looks like TFS is struggling due to the size of the check-in, basically the project team (1 person at the time) worked on the code for a while out of source control, then added the whole lot in one go, so it's a large checkin adding lots of code.

    this is the exception I get in the migration tool (See below)

    Does anyone know if there is somewhere I can increase a timeout value for this? the log file is showing me that it took just over an hour then gave up.

    Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: Team Foundation services are not available from server ned\DefaultCollection.
    Technical information (for administrator):
      The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.GetResponse()
       at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.AsyncWebRequest.ExecRequest(Object obj)
       --- End of inner exception stack trace ---
       at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive, String fileType, LockLevel lockLevel, Boolean treatMissingItemsAsFiles, Boolean silent)
       at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive)
       at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths)
       at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.pendAdds()
       at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.pendChanges()
       at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.Flush()
       at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.TfsVCMigrationProvider.Flush(BatchingContext context)
       at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.TfsVCMigrationProvider.ProcessChangeGroup(ChangeGroup group)

    And from the log file:

    [15/02/2011 11:20:19] TfsMigrationShell.exe Information: 0 : VersionControl: Processing ChangeGroup #117829
    [15/02/2011 11:20:21] TfsMigrationShell.exe Information: 0 : VersionControl: Finished scheduling!
    [15/02/2011 12:23:38] TfsMigrationShell.exe Warning: 0 : VersionControl: Team Foundation services are not available from server ned\DefaultCollection.
    [15/02/2011 12:23:38] Technical information (for administrator):
    [15/02/2011 12:23:38]   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
    [15/02/2011 12:23:38] TfsMigrationShell.exe Information: 0 : VersionControl: Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: Team Foundation services are not available from server ned\DefaultCollection.
    [15/02/2011 12:23:38] Technical information (for administrator):
    [15/02/2011 12:23:38]   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    [15/02/2011 12:23:38]    at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
    [15/02/2011 12:23:38]    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    [15/02/2011 12:23:38]    --- End of inner exception stack trace ---
    [15/02/2011 12:23:38]    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    [15/02/2011 12:23:38]    at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    [15/02/2011 12:23:38]    at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
    [15/02/2011 12:23:38]    --- End of inner exception stack trace ---
    [15/02/2011 12:23:38]    at System.Net.HttpWebRequest.GetResponse()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.AsyncWebRequest.ExecRequest(Object obj)
    [15/02/2011 12:23:38]    --- End of inner exception stack trace ---
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive, String fileType, LockLevel lockLevel, Boolean treatMissingItemsAsFiles, Boolean silent)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.pendAdds()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.pendChanges()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.Flush()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.TfsVCMigrationProvider.Flush(BatchingContext context)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.TfsVCMigrationProvider.ProcessChangeGroup(ChangeGroup group)
    [15/02/2011 12:23:38] TfsMigrationShell.exe Information: 0 : VersionControl: Unresolved conflict: 
    [15/02/2011 12:23:38]   Session: 32d2c81d-7e9c-4289-abc0-f90930d04dd1
    [15/02/2011 12:23:38]   Source: 328caa2a-82a6-49ed-b8ee-6c3af86a1b7c
    [15/02/2011 12:23:38]   Message: Cannot find applicable resolution rule.
    [15/02/2011 12:23:38]   Conflict Type: Runtime Error
    [15/02/2011 12:23:38]   Conflict Type Reference Name: f6dab314-2792-40d9-86cc-b40f5b827d86
    [15/02/2011 12:23:38]   Conflict Details: Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: Team Foundation services are not available from server ned\DefaultCollection.
    [15/02/2011 12:23:38] Technical information (for administrator):
    [15/02/2011 12:23:38]   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    [15/02/2011 12:23:38]    at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
    [15/02/2011 12:23:38]    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    [15/02/2011 12:23:38]    --- End of inner exception stack trace ---
    [15/02/2011 12:23:38]    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    [15/02/2011 12:23:38]    at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    [15/02/2011 12:23:38]    at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
    [15/02/2011 12:23:38]    --- End of inner exception stack trace ---
    [15/02/2011 12:23:38]    at System.Net.HttpWebRequest.GetResponse()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.AsyncWebRequest.ExecRequest(Object obj)
    [15/02/2011 12:23:38]    --- End of inner exception stack trace ---
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive, String fileType, LockLevel lockLevel, Boolean treatMissingItemsAsFiles, Boolean silent)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths, Boolean isRecursive)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendAdd(String[] paths)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.pendAdds()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.pendChanges()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.BatchingContext.Flush()
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.TfsVCMigrationProvider.Flush(BatchingContext context)
    [15/02/2011 12:23:38]    at Microsoft.TeamFoundation.Migration.Tfs2010VCAdapter.TfsVCMigrationProvider.ProcessChangeGroup(ChangeGroup group)
    [15/02/2011 12:23:38] 
    [15/02/2011 12:23:38] 
    [15/02/2011 12:23:38] TfsMigrationShell.exe Information: 0 : VersionControl: Stopping current trip for session: 32d2c81d-7e9c-4289-abc0-f90930d04dd1
    [15/02/2011 12:23:38] TfsMigrationShell.exe Information: 0 : VersionControl: VersionControl: Session stopped!
    [15/02/2011 12:23:38] TfsMigrationShell.exe Information: 0 : VersionControl: Session worker thread [VersionControl] completed

    Tuesday, February 15, 2011 12:40 PM

All replies

  • This is likely occuring on the web server level where the web server has limits on how much data you can send to it at once, send too much and it kills the connection and you get this exact error. Either change the settings in IIS or add the following line to the web.config in TFS in the <system.web> node:

    <httpRuntime maxRequestLength="1073741824" executionTimeout="3600" />

     

    Full details of this can be found : http://msdn.microsoft.com/en-us/library/e1f13641(v=vs.71).aspx

     


    Robert MacLean - www.sadev.co.za
    Tuesday, February 15, 2011 2:51 PM
  • thanks for the swift reply robert, i'll give it a go and let you know... (Need to wait till after hours, I assume I'll need to reboot IIS after chning setting...)
    Tuesday, February 15, 2011 3:57 PM
  • Yes, restart IIS is needed.
    Robert MacLean - www.sadev.co.za
    Wednesday, February 16, 2011 8:40 AM
  • Thanks for your suggestion but... I never did get this working. Same error, changed sooo many settings in so many config files, always making them larger but still same error at about the same amount of time in as always.

    I'm about to resort to "take a copy of the source code and check it in to the new server" unless any more suggestions.

    Thanks,

    Mike G

     

     

    Monday, March 7, 2011 10:40 PM
  • Hi,

    I know it has been a while but did you ever get this working. I'm trying to migrate a project right now and I get the same error. It throws it during the Discovery phase and always hangs on the same changeset, which is pretty large.

    Thanks,

    Patrick

    Tuesday, August 28, 2012 11:57 PM
  • As my last post says, I resorted to "copy the source code and re-check in the solution"

    (which resulted in losing all the change history)

    I would try the IIS config suggestion 1st though!

    Wednesday, August 29, 2012 7:48 AM
  • Right, I was just hoping that since then you may have found an alternative solution. Migrating without history is not an option for me unfortunately, I need to figure this out. I've done countless migrations, many larger than this, and I've never seen this issue before. The IIS config change suggested by Robert did not work.

    I have noticed that as soon as it starts analyzing the changeset in question, it always throws the error after exactly 5 minutes. So similar to what you said Mike, I have gone through more config's and settings than I care to count looking for where a "5 minute timeout (300 sec)" would be. So far no luck though.

    One thought I've had is that maybe the issue is being caused by SQL Express. I am running the integration tool on my local box where I just have SQL Express 2008 R2 installed. I know it has a db size limit of 10GB, but it is not at that threshold yet, and I don't see any kind of errors relating to this limitation. So maybe there is some other limitation of SQL Express that I'm not aware of?

    If anyone else out there has seen anything similar, please let me know of anything that may help.

    Thanks!

    Patrick

    Wednesday, August 29, 2012 4:40 PM
  • Possibly might be due to fact that IIS has many config files, web.config also machine.config etc...

    You can also have config files in subfolders in ASP.NET etc..

    Wednesday, August 29, 2012 8:51 PM
  • Thursday, February 5, 2015 5:46 AM