While deploying my solution in visual studio in my development environment I came across a very strange issue. While uploading some master pages defined in my an Elements.xml file, the deployment threw an exception

System.Runtime.InteropServices.COMException: 0x81020030 The URL '_catalogs/masterpage/IntranetMaster.html' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.

After some research and checking the ULS logs I saw this exception:

System.Data.SqlClient.SqlException (0x80131904): Arithmetic overflow error for data type smallint, value = 32768

ExecuteQuery failed with original error 0x80131904

SQL error code from last error 220 - Arithmetic overflow error for data type smallint, value = 32768.

I scanned the SharePoint content database for smallint columns with high values and found that the ClientTag column inside the AllSites table had a value of 32767.

I updated the value to 16000 and my deployment works as expected. It seems like every time I deploy, this number increases in value and eventually it has increased to the maximum value of smallint.

Has anyone experienced this before? What have I done wrong? Is this a bug in SharePoint 2013?

1 Answer 1



I did a cursory glance online to see what others are saying about this error. The consensus so far has been a problem with a Search Service crawl that hangs. Check and see if this applies to you and let me know what you find. I'm eager to help.

See here:

The Never-Ending Crawl (part 1)

SharePoint 2013 Full Crawl never stops

You could also try renaming the masterpage that is being uploaded. That seems to be what others have tried as a work around.


  • Thanks for your reply, however I don't have the search service installed
    – soniiic
    Jun 23, 2015 at 12:01
  • just updated my answer
    – jpollar
    Jun 28, 2015 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.