Java heap space error when migrating to Visual Studio Online using OpsHub Migration Tool

好久不见. 提交于 2019-12-25 02:53:15

问题


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:


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



来源:https://stackoverflow.com/questions/23944779/java-heap-space-error-when-migrating-to-visual-studio-online-using-opshub-migrat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!