none
Maximum Number of Values in a Lookup Column RRS feed

  • Question

  • Hi All - I created a single lookup column on list A to list B which contains 50,000 items.  When I try to create a new item in list A the page errors out with a very generic/useless error message.  I've already increased the List View Threshold to 75,000.  Any reason why this is happening or how I can allow the lookup column to display this many items.  I understand the performance risks.

    Friday, November 13, 2015 3:21 AM

Answers

All replies

  • Hi,

    Assuming you have a SharePoint 2013 on-premise environment (because you changed the List View Threshold), you can first search for the Correlation ID in the LOGS. It will tell you a much more specific error message, which makes more sense. It could be anything at this point.

    If you want any help on that, just post it here.

    All the best,
    Quincy

    Friday, November 13, 2015 8:39 AM
  • Hi skot- Quincy's suggestion will definitely help determine the actual cause, but I'm pretty sure it's a timeout issue due to the size of the list it's trying to look up. Sounds like you know this, but you really shouldn't have a list that large. I highly suggest taking a different approach. You're only going to run into more problems if you continue down this road.

    cameron rautmann

    Friday, November 13, 2015 8:58 PM
  • How do you increase the timeout?
    Friday, November 13, 2015 9:45 PM
  • Increasing the timeout is normally a waste of time. There's normally a reason a timeout is being hit, just increasing the value it waits normally doesn't make a difference.

    I've seen lists and libraries in the millions without timeout issues. It's possibly related but i wouldn't bet on it. Look at the correlation ID.

    Friday, November 13, 2015 10:08 PM
  • Here is the relevant info in the log...any thoughts?
    Application error when access /Lists/Encounters/NewForm.aspx, Error=Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.   at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)     at Microsoft.SharePoint.WebControls.ClientFormManager.OnPreRender(EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursive...	d399419d-3f07-30f8-96e2-c3590519ec28
    11/14/2015 14:19:55.17*	w3wp.exe (0x4374)                       	0x2D68	SharePoint Foundation         	General                       	8nca	Medium  	...Internal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)	d399419d-3f07-30f8-96e2-c3590519ec28
    11/14/2015 14:19:55.20 	w3wp.exe (0x4374)                       	0x2D68	SharePoint Foundation         	Runtime                       	tkau	Unexpected	System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.    at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)     at Microsoft.SharePoint.WebControls.ClientFormManager.OnPreRender(EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.P...	d399419d-3f07-30f8-96e2-c3590519ec28
    11/14/2015 14:19:55.20*	w3wp.exe (0x4374)                       	0x2D68	SharePoint Foundation         	Runtime                       	tkau	Unexpected	...reRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)	d399419d-3f07-30f8-96e2-c3590519ec28
    11/14/2015 14:19:55.20 	w3wp.exe (0x4374)                       	0x2D68	SharePoint Foundation         	General                       	ajlz0	High    	Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.     at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)     at Microsoft.SharePoint.WebControls.ClientFormManager.OnPreRender(EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveI...	d399419d-3f07-30f8-96e2-c3590519ec28
    11/14/2015 14:19:55.20*	w3wp.exe (0x4374)                       	0x2D68	SharePoint Foundation         	General                       	ajlz0	High    	...nternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHa...	d399419d-3f07-30f8-96e2-c3590519ec28
    11/14/2015 14:19:55.20*	w3wp.exe (0x4374)                       	0x2D68	SharePoint Foundation         	General                       	ajlz0	High    	...ndlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)	d399419d-3f07-30f8-96e2-c3590519ec28

    Saturday, November 14, 2015 7:48 PM
  • Hi,

    As I understand, you encountered error when creating the new item in the list A in SharePoint 2013.

    How many are the lookup, person/group and workflow status columns in the list A?

    According to the error message, you could set the MaxJsonLength property in the web.config. For more detailed information, you could refer to the case below.

    There is a similar case:

    http://stackoverflow.com/questions/1151987/can-i-set-an-unlimited-length-for-maxjsonlength-in-web-config

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    Tuesday, November 17, 2015 2:09 AM
    Moderator
  • Hi,

    If the reply is helpful to you, you could mark the reply as answer to close the case.

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Wednesday, November 25, 2015 12:54 AM
    Moderator
  • Your situation matches mine; only I'm dealing with hundreds of thousands of list items (I know, not advisable, but necessary... for now). Buried in the ULS logs under the correlation ID you've been shown, you'll probably find stuff about: "System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property." I've only found one other post, by Rashid Aziz, which offers a suggestive work-around for this issue (aside from the multitude of posts saying to change your web.config which Rashid mentions did not work). Unfortunately, I couldn't figure out how to implement Rashid's work-around because a core piece of the instructions is found in a linked post which no longer exists. In the process of trying to figure it out, I found that if I created new forms with SharePoint Designer 2013, they would work. I suspect the new forms are using CAML queries server-side to get the lookup data whereas the OOB 2013 forms use likely use client-side logic.

    Just make sure you setup the indexed columns you need before you reach the threshold. Else, you'll have to at least bump up the threshold temporarily to get them created. Using indexes greatly reduces the hassles with large lists.

    Wednesday, January 25, 2017 9:44 PM