Search code examples
sdkanalyticsrally

Rally Analytics 2.0 - Error 413: Request Entity Too Large


I have been writing an app which uses the lookback tool to get the total number of points a project had within it on a certain date. The request to pull this information looks as follows:

getPointsOn: function(date, iOIDs, callback) {
    var params    = {};
    params.find   = '{ Iteration: {$in: [' + iOIDs + ']}, PlanEstimate: { $gt: 0 }, __At: "' + date.toISOString() + '" }';
    params.fields = '[ "PlanEstimate", "Project" ]';

    Ext.Ajax.cors = true;
    Ext.Ajax.request({
        url: App.qURL,
        method: 'GET',
        params: params,
        withCredentials: true,
        success: function(response) {
            var points = {};
            Ext.Array.each(Ext.JSON.decode(response.responseText).Results, function(US) {
                if (points[US.Project] == undefined) points[US.Project] = 0;
                points[US.Project] += US.PlanEstimate;
            });
            callback(points);
        },
        failure: function() {
            console.log('Ajax Failed');
            callback({});
        }
    });
}

It returns an object with Project/Points pairs and works perfectly when 1-2 iteration ObjectIDs are passed to it. The problem is when I start requesting larger data sets. I have been getting the "Request Entity Too Large" error. I assume this is a problem with the request itself although I'm not sure how it could be "too large". What is the likely cause of this error?

Thanks!


Solution

  • Large state elements, such as the values selected from a picker, should be stored with a Ext.state.LocalStorageProvider instance, rather than a Ext.state.CookieProvider. Assuming that the cookie does not need to be sent to fulfill the query request.