tfsazure-devops-server-2020

Azure DevOps Server witadmin error 500 when downloading/uploading workitem XML


We use On-premises XML process model (not inherited) on Azure DevOps Server 2020 Update 1.2.

Recently, on one of our collections, we cannot upload the xml description via witadmin. The exportwitd, importwitd, exportgloballist commands fail with error code 500: Internal Server Error.

In the Event Viewer there is an error in the Application log ArithmeticException: Overflow or underflow in the arithmetic operation. The error occurs in the web service at /ourcollection/WorkItemTracking/v8.0/ClientService.asmx.

In the operation log (_oi), error 500 was recorded in the WorkItem Tracking application on the GetMetadata_Full command, command identifier GetMetadataEx2.

Reproduces with different projects in this collection. There is no problem with other collections.

Find on SOF that the error ArithmeticException: Overflow or underflow in the arithmetic operation often occurs in ASP.Net MVC applications when uploading files larger than 1 Gb. And it is usually solved by disabling buffering. But it is not clear how a file with an xml description can be larger than 1 Gb (often wit file ~50 kb) and how to disable buffering, because this is done in the application source codes.


Solution

  • Workaround: I deleted about 30 old inactive projects, leaving 1040 projects in the collection. After that witadmin started working.

    I think that's a bug of Azure DevOps Server, because "for on-premises Azure DevOps Server, there are no hard limits to the number of projects" (https://learn.microsoft.com/en-us/azure/devops/organizations/settings/work/object-limits?toc=%2Fazure%2Fdevops%2Forganizations%2Ftoc.json&view=azure-devops-2020#projects).

    I'm report a problem at MS Developer Community - https://developercommunity.visualstudio.com/t/Witadmin-error-500-when-downloadinguplo/10627090