2.3.0.334 Error: JSON serialization

PDinCAPDinCA Posts: 642 Silver 1
edited October 25, 2011 12:52PM in SQL Monitor Previous Versions
/TopQueries/AlertDetails?channelInstanceRef=7%3ACluster%2C1%2C4%3AName%2Cs31%3A308186-ntclus.iad.intensive.int%2C9%3ASqlServer%2C1%2C4%3AName%2Cs0%3A%2C&date=10%2F24%2F2011%2009%3A51%3A47: 500 error
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 System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj) 
at System.Web.Mvc.JsonResult.ExecuteResult(ControllerContext context) 
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11() 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) 
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) 
at System.Web.Mvc.Controller.ExecuteCore() 
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__4() 
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() 
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) 
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() 
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) 
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)/TopQueries/AlertDetails?channelInstanceRef=7%3ACluster%2C1%2C4%3AName%2Cs31%3A308186-ntclus.iad.intensive.int%2C9%3ASqlServer%2C1%2C4%3AName%2Cs0%3A%2C&date=10%2F24%2F2011%2009%3A51%3A47: 500 error
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 System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj) 
at System.Web.Mvc.JsonResult.ExecuteResult(ControllerContext context) 
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11() 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) 
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) 
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) 
at System.Web.Mvc.Controller.ExecuteCore() 
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__4() 
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() 
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) 
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() 
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) 
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
It's probably down to some enormous queries that we run to aggregate our data - CTE's nested to 6 levels with GROUPing etc. 2200 lines and 116K.

Is the JSON string length configurable?
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...

Comments

  • Hi,

    This error happens because one of the query may be very long. We are tracking this as SRP-4859 for now. This will be fixed for V 3.0 release.

    Thanks,
    Priya
    Priya Sinha
    Project Manager
    Red Gate Software
  • PDinCAPDinCA Posts: 642 Silver 1
    We had the JSON length issue in our Production .Net application and simply changed the config to get around it. No such ability with SQL Monitor?
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
Sign In or Register to comment.