Request failed with status 500 on Mobile

I am developping a mobile app where the user make a request to the server, the server manipulate the data and than returns the data to the mobile device. The problem is when there is lots of data, the server spend to much time manipulating the data and the mobile app shows the following error:

Request failed with status 500

In the Service Center this error also appears as "Failed to find exception mapping for OSRequestTimeoutException".

I debugged the server action and discover that mobile app shows the error, but the server keeps running the action. I already changed the configuration "Server Request Timeout" of mobile app, but the error persists.

Processing large amount of data from mobile device is not a good way. you should use more filters in database when you request to server and get only that data which you need, also try to get limited no of records from server.

You should also consider the performance of each request.You can use On Scroll Ending event to achieve paging in list.

Fetch data on demand

Fetch records as you need them instead of all at once. Start with a minimum set, for example, 10 records. As the user scrolls down, use the On Scroll Ending event to fetch the next set of records — for example, the following 10 records.

To understand how this works, scaffold a list on a screen and this mechanism is provided by default.

Processing large amount of data from mobile device is not a good way. you should use more filters in database when you request to server and get only that data which you need, also try to get limited no of records from server.

You should also consider the performance of each request.You can use On Scroll Ending event to achieve paging in list.

Fetch data on demand

Fetch records as you need them instead of all at once. Start with a minimum set, for example, 10 records. As the user scrolls down, use the On Scroll Ending event to fetch the next set of records — for example, the following 10 records.

To understand how this works, scaffold a list on a screen and this mechanism is provided by default.

Regards

Shoeb

Hi Shoeb,

the problem is that app need to load all this data because it will work offline most off the time, so the user need all the data he needs to work with the app.

If you don't want to store in local storage maybe you can add some metadata to just manipulate the data that was changed after last sync and store that data in a table to reduce process time.

Hope this can help you. ;)

Best regards,

Ricardo

Hi Ricardo,

the app work this way: user request his data, keeps offline while uses the app, then upload what he did.

I'm keeping all data on local storage, but the problem is when I need to download all the data, the server takes too long to manipulate the data to give everything done for use of the app, then the app give an timeout error, but the server keeps running.

Processing large amount of data from mobile device is not a good way. you should use more filters in database when you request to server and get only that data which you need, also try to get limited no of records from server.

You should also consider the performance of each request.You can use On Scroll Ending event to achieve paging in list.

Fetch data on demand

Fetch records as you need them instead of all at once. Start with a minimum set, for example, 10 records. As the user scrolls down, use the On Scroll Ending event to fetch the next set of records — for example, the following 10 records.

To understand how this works, scaffold a list on a screen and this mechanism is provided by default.

Regards

Shoeb

Hi Shoeb,

the problem is that app need to load all this data because it will work offline most off the time, so the user need all the data he needs to work with the app.

Hi Henrique,

If you have large no of data and you want to sync all data so i suggest try to get that data in chunks bcoz processing that much data sever takes time so it might get timeout.

Also try not to get that data which has been sync already in next sync call u can refer sync mechanism or u can create your own.