Timeout when calling ToDataSourceResult

2 posts, 0 answers
  1. Michael
    Michael avatar
    1 posts
    Member since:
    Sep 2010

    Posted 13 Dec 2012 Link to this post

    I am receiving a timeout error via an AJAX call when using Kendo with MVC.  The result set is a large set of records approx 250K with 14 fields though I would not expect this to timeout.  Any ideas why this might be happening?
    public ActionResult Grid_Read([DataSourceRequest]DataSourceRequest request)
        var dbContext= new DataBaseContext();
        IQueryable<Report> ReportData = from ParentRecord in ParentTable
                      join ChildRecord in ChildTable on ParentRecord.Id equals ChildRecord.ParentId
                      select new ReportModel
                          FieldOne = ParentRecord.FieldOne,
                          FieldTwo = ParentRecord.FieldTwo,
                          FieldThree = ChildRecord.FieldThree
        DataSourceResult result = ReportData .ToDataSourceResult(request);
        return Json(result);
  2. Daniel
    Daniel avatar
    2226 posts

    Posted 15 Dec 2012 Link to this post

    Hello Michael,

    Does the problem occur when returning JSON and the ToDataSourceResult is not used? With 250k records you will probably get an exception for exceeding the maximum JSON length in which case you should either use custom JSON result or paging.

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top