akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

Increase in cases of Internal Server Error #474

Closed janagombitova closed 7 years ago

janagombitova commented 7 years ago

Needs investigation

In the last weeks we have been increasingly receiving support requests from partners saying that they are not successful in syncing existing data points to their devices and receiving Internal Server Error messages. Sometimes after waiting and attempting to sync again it all works, sometimes a power boost is needed for the instance as the requests times out.

Can we please take a more in depth look at what might be causing this problem to reoccur so often and also for not so large surveys with not so many data? Thanks

stellanl commented 7 years ago

For akvoflow-92, the problem is simply that some calls to /surveyedlocale take too long. But some don't. There seems to be a connection with the amount of data returned. There is a call in the log that took 48 seconds and returned 1.73 MB, whereas some are finished in as little as 600ms.

valllllll2000 commented 7 years ago

I have tested on dev2 and only managed to reproduce this once at the beginning of the day. I did not manage to get any comprehensive logs on the device but looking in google cloud console, I have seen that it runs out to be a 500 error and the requests took 60.4s. I never managed to reproduce it again. From what I have seen the records are synced 300 by 300 so maybe reducing this number on backend could be a fix, not sure... I do not think there is something we can do on the mobile app about this issue so closing it. Will open issue on akvo-flow.