This is a migrated thread and some comments may be shown as answers.

503 errors when paging.

3 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 26 Jul 2018, 11:54 AM

Running into a weird issue, we're setting up our grids with javascript for this page. 

 

 $('#assets-grid').kendoGrid({
                dataSource: new kendo.data.DataSource({
                    transport: {
                        read: 'application/GetAssetDetails'
                    },
                    schema: {
                        data: function(response) {
                            var result = [];

                            if (!response.success && response.message) {
                                errorAlert(response.message, 'modalNoteLabel', 10000);
                            }

                            if (response && response.Data) {
                                result = response.Data;
                            }
                            return result;
                        },
                        total: function(response) {
                            var length = 0;
                            if (response && response.Data) {
                                length = response.Data.length;
                            }

                            return length;
                        }
                    },
                    pageSize: 10,
                    serverPaging: false //I added this to fix, also tried serverOperation:false and that didnt work
                }),
                autoBind: false,
                sortable: true,
                scrollable: false,
                pageable: true,
                columns: [
                    {
                        field: 'Column',
                        title: 'olumne',
                        attributes: {
                            'title': '#: Column #'
                        },
                        headerAttributes: {
                            'title': 'column'
                        }
                    },
                    {
                        field: 'Column',
                        title: 'Column',
                        attributes: {
                            'title': '#: Column #'
                        },
                        headerAttributes: {
                            'title': 'Column'
                        }
                    },
                    {
                        field: 'Column',
                        title: 'Column',
                        attributes: {
                            'title': '#: Column #'
                        },
                        headerAttributes: {
                            'title': 'Column'
                        }
                    },
                    {
                        field: 'Column',
                        title: 'Column',
                        attributes: {
                            'title': '#: Column #'
                        },
                        headerAttributes: {
                            'title': 'Column'
                        }
                    }
                ],
                noRecords: {
                    template: "No records are found."
                }
            });

 

Ive added the section in the Datasource for serverPaging: False. 

 

What was happening is when the user loads the gird it would load fine, when they navigated the pages its fine, however if you looked at the network tab in developer tool bar or monitored events on the server you would notice 503 for the request stating that the id coming back is null. I tried to use serverOperation:false but that was still showing the same issue. I switched it to serverPaging and it seems to be resolved. My question is, Is this correct? Is there something else I am missing that should be done to prevent 503's when navigating paging?


3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 30 Jul 2018, 08:26 AM
Hi Matt,

Thank you for the code and additional information. I have examined it, however, it would be hard to pinpoint what is causing the error without further investigation. 

Usually error 503 is thrown when the server is overloaded and cannot handle a request. Please check if that is the case and try to decrease the number of requests to the server and see how the behavior changes. 


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Matt
Top achievements
Rank 1
answered on 30 Jul 2018, 12:32 PM

I don't think thats the case, what seems to be happening is when the user opens the gird, then sorts on one of the columns to descending then they page the grid the request are firing back nulls of the ID of the read. However the UI is loading the data on the client side and showing it correctly. 

when we set the grid up we changed serverFiltering, serverPaging, and serverSorting to false so the client handles all that. 

 

I am not sure what else we can do to prevent these 503 errors that popup in the event logs. 

0
Viktor Tachev
Telerik team
answered on 01 Aug 2018, 07:24 AM
Hi Matt,

When server paging, grouping, filtering, etc. are set to false the operations will be performed on the client and no requests will be sent to the server. Thus, if the server is overloaded using that approach will mean sending less requests and that can help reducing the number of 503 errors.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Matt
Top achievements
Rank 1
Share this question
or