Java heap space error when migrating to Visual Stu

2019-09-09 02:10发布

I'm trying to use the OpsHub migration tool to get our source code onto Visual Studio Online. Partway through the migration, the progress page indicates an error occurred and that the migration has halted, and yet the process still continues to run (ie - Migration Status still says it's Running, and process manager indicates work is still being done by the opshubtfsservice.exe process).

If I click on the hyper link in the error message, it opens a popup dialog indicating there's been a Java heap space error of some kind. Looking closer at running processes, I can see the Java.exe process is using up over 2GB of RAM. I'm running the migration tool on a Windows 7 x64 machine with 16GB of RAM and loads of disc space free. Source server is running TFS 2013.

I've run the tool a few times now, and run into the same issue right at the same point during the migration (xxxx/yyyy Chageset(s)/Label(s) passed). It doesn't seem to get to xxxx+1/yyyy, but perhaps I just need to let it run longer as it's likely chewing on some large changeset of somekind.

Any suggestions on how, or if it's possible to get passed this error? Should I be concerned about it, or just roll with it and see what happens if I let the process continue?

1条回答
爷的心禁止访问
2楼-- · 2019-09-09 02:42

By default the migration utility is restricted to using 2GB of memory.

Please follow the following steps to allow it to use more memory.

1) Close application

2) Go to \OpsHub Visual Studio Online Migration Utility\OpsHubServer6.0.16\bin (Installation Drive may be: C:\Program Files)

3) Open service.bat in NotePad. Find following string "-Xmx2048m". Replace -Xmx2048m to -Xmx4096m (or the appropriate number for the max memory size)

4) Save file

5) In same folder

Run unregisterservice.bat as administrator (Which will unregister OpsHub service. Verify by opening services.msc there will be no "OpsHub Visual Studio Online Migration Utility" service)

Run registerservice.bat as administrator (Which will register OpsHub service. Verify by opening services.msc and there will be "OpsHub Visual Studio Online Migration Utility" service with "Automatic" startup type)

6) Open services.msc, Right click on "OpsHub Visual Studio Online Migration Utility" , Click on properties, select startup type "Manual" click on "Apply"

7) Start application which will now use 4096m memory (4 GB) or whatever amount specified in step 3

查看更多
登录 后发表回答