TFS 检查包含“更大"的变更集的超时时间二进制文件 [英] TFS check in timeout of changeset containing "larger" binary files

查看:25
本文介绍了TFS 检查包含“更大"的变更集的超时时间二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在执行从 tfs.visualstudio 到本地 2012 服务器的 TFS 集成迁移.我遇到了一个包含多个超过 1 MB 的二进制文件的特定变更集的问题,其中一些是 15-16 MB.[我正在使用本地 TFS 远程 (WAN) 工作]

I'm performing a TFS Integration migration from tfs.visualstudio to an on-premise 2012 server. I'm running into a problem with a particular changeset that contains multiple binary files in excess of 1 MB, a few of which are 15-16 MB. [I'm working remotely (WAN) with the on-premise TFS]

从 TFSI 日志中,我看到:Microsoft.TeamFoundation.VersionControl.Client.VersionControlException: C:\TfsIPData\42\******\Foo.msi: The request was aborted: The请求被取消.--->System.Net.WebException:请求被中止:请求被取消.--->System.IO.IOException:在写入所有字节之前无法关闭流.

From the TFSI logs, I'm seeing: Microsoft.TeamFoundation.VersionControl.Client.VersionControlException: C:\TfsIPData\42\******\Foo.msi: The request was aborted: The request was canceled. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.IO.IOException: Cannot close stream until all bytes are written.

通过谷歌搜索,我遇到了其他人遇到类似问题,不一定与 TFS 集成有关.如果我只是像正常一样签入满足相同标准的变更集,我相信会出现同样的问题.据我了解,上传文件(签入)时,默认的块大小为 16MB,超时为 5 分钟.

Doing some Googling, I've encountered others running into similar issues, not necessarily concerning TFS Integration. I'm confident this same issue would arise if I were just checking in a changeset like normal that met the same criteria. As I understand it, when uploading files (checking in), the default chunk size is 16MB and the timeout is 5 minutes.

我在这个网站上的互联网上传速度只有 1Mbit/s.(虽然我认为如果上传带宽充足,问题会得到缓解,但并不能解决问题).

My internet upload speed is only 1Mbit/s at this site. (While I think the problem would mitigated with sufficient upload bandwidth, it wouldn't solve the problem).

使用 TCPView,我在上传过程中观察了从我的客户端到 TFS 服务器的连接.我看到的是 9 个同时连接.因此,我的带宽在 9 个文件上传之间共享.果然,大约 5 分钟后,连接在上传字节计数完成之前就中断了.

Using TCPView, I've watched the connections to the TFS server from my client while the upload was in progress. What I see is 9 simultaneous connections. My bandwidth is thus getting shared among 9 file uploads. Sure enough, after about 5 minutes the connections crap out before the upload byte counts can finish.

我的问题是,如何配置我的 TFS 客户端以利用更少的并发连接和/或更小的块大小和/或增加的超时?这可以在全球某个地方完成以涵盖 VS、TF.EXE 和 TFS 集成吗?

My question is, how can I configure my TFS client to utilize fewer concurrent connections, and/or smaller chunk sizes, and/or increased timeouts? Can this be done globally somewhere to cover VS, TF.EXE, and TFS Integration?

推荐答案

在 IL DASM 花了一些时间在 Microsoft.TeamFoundation.VersionControl.Client.dll FileUploader 中摸索之后,我在构造函数中发现了字符串 VersionControl.上传块大小.看起来它用于覆盖默认块大小(DefaultUploadChunkSize = 0x01000000).

After spending some time with IL DASM poking around in Microsoft.TeamFoundation.VersionControl.Client.dll FileUploader, I discovered in the constructor the string VersionControl.UploadChunkSize. It looked like it is used to override the default chunk size (DefaultUploadChunkSize = 0x01000000).

因此,我将其添加到 TfsMigrationShell.exe.config

So, I added this to TfsMigrationShell.exe.config

<appSettings>
    <add key="VersionControl.UploadChunkSize" value="2097152" /> 
</appSettings>

并再次运行 VC 迁移——这次它超越了问题变更集!

and ran the VC migration again -- this time it got past the problem changeset!

基本上,TFS 客户端 DLL 将尝试同时上传多个文件(在我的情况下为 9 个).您的上传带宽将在文件之间分配,如果任何单个文件传输不能在 5 分钟内完成 16MB,操作将失败.所以你可以看到,在适度的上传带宽下,包含多个二进制文件的变更集可能会超时.您唯一可以控制的是每 5 分钟超时块的字节数.默认值为 16MB,但您可以减少它.我把我的减少到 2MB.

Basically the TFS client DLL will try and upload multiple files simultaneously (9 in my case). Your upload bandwidth will be split among the files, and if any individual file transfer cannot complete 16MB in 5 minutes, the operation will fail. So you can see that with modest upload bandwidths, changesets containing multiple binary files can possibly timeout. The only thing you can control is the bytecount of each 5 minute timeout chunk. The default is 16MB, but you can reduce it. I reduced mine to 2MB.

我想这可以对 devenv.exe.config 执行,以在执行开发人员代码签入时处理相同的问题.希望这些信息能帮助其他人并为他们节省一些时间.

I imagine this could be done to devenv.exe.config to deal with the same problem when performing developer code check ins. Hopefully this information will help somebody else out and save them some time.

这篇关于TFS 检查包含“更大"的变更集的超时时间二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆