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.
Someone knows what to do?
Hi Henrique,
Your using any sync technique? Why you don't store data in Local storage and just sync what you need?
See if this can help you: https://www.outsystems.com/learn/lesson/787/data-synchronization/
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
Ricardo Pereira wrote:
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.
Regards
Shoeb
Shoeb Khan wrote:
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.
Henrique Perfoll Neto wrote:
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.
Please refer this it can help !!
https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Offline/Offline_Data_Sync_Patterns/Read-Only_Data_Optimized