Location sending timeout (update takes >10s)
When succeeding, the logs say MessageProcessorEndpointHttp: Message id=... sent in 9656ms with the number varying between 9200ms and 9800ms. This is sending locations to Nextcloud. Sometimes I see series of updates going at around 300-600ms, but then it's slow again. I don't know if this is owntracks or nextcloud's problem, but any advice would be useful.
I tried moving the location history in Nextcloud from one session to another, hoping that it might be nextcloud's fault for having really slow updates when the history is large (it's several months). Even deleting the whole session didn't help.
I see a lot of I/O (wait) on the server when I upload a location. Is there something I should do with auth tokens to make this go faster?
- App build number: 20408019
- Android version: 12
- Device: Pixel 5
- Installation source: Google Play
That message comes from https://github.com/owntracks/android/blob/master/project/app/src/main/java/org/owntracks/android/services/MessageProcessorEndpointHttp.java#L233, which is where it times how long it takes to send the HTTP request. As you can see, it simply records the time, sends the request and, on success, works out how much time has elapsed.
If this is a long time, my strong hunch is that this is either because your network is slow or your server is slow in responding.
I don't know enough about Nextcloud to be able to make any informed guesses as to what's going on here, but if the server's spending a lot of time in iowait, that hints that the disk subsystem is probably going a little bit slowly (or nextcloud is doing a lot of io per update, which doesn't seem likely).
What's Nextcloud persisting data to?