Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent crashes #47

Open
mgranberry opened this issue Apr 8, 2015 · 5 comments
Open

Frequent crashes #47

mgranberry opened this issue Apr 8, 2015 · 5 comments

Comments

@mgranberry
Copy link

mgranberry commented Apr 8, 2015

I don't know if it is a quirk with my setup, but I have been experiencing almost constant crashes by the watch app. Upon reviewing log entries, it appeared to be crashing after waves of 5 or more rapid attempts to resend a message to the JavaScript portion of the app. After changing APPSYNCANDMSG_RETRIES_MAX to 0, the crashes have gone away and my watch's battery life is much improved, probably because the bluetooth interface has a chance to shut down when the phone is busy and waiting on the JavaScript engine to start up.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@jasoncalabrese
Copy link
Member

Those bursts of requests seem to be related the phone taking too long to respond, probably because of something else running. Would be interesting to see what effect this has when there are network interruptions.

@krystophv
Copy link

I noticed that the default behavior of the watch app is to immediately retry sending the message on an app_sync error. I also noticed that (for me, anyway) the chances of a successive app_sync error once one has happened are almost 100%, so it ends up sending APPSYNCANDMSG_RETRIES_MAX messages to the phone, which in turn will queue up that many XMLHttpRequests to the nightscout endpoint. Eventually, the majority of these will return, but it's like hitting the refresh button on the server 50 times as fast as you can and then sending all that data to the watch over and over again. I set mine to try a couple of times at 10 second intervals and then just wait till the next minute tick to try after that.

@ELUTE
Copy link
Contributor

ELUTE commented Jun 10, 2015

Usually this is a problem if your phone is low on resources. Try closing open applications and freeing space on the phone

@dustin-lennon
Copy link

Where is APPSYNCANDMSG_RETRIES_MAX set at?

@ELUTE
Copy link
Contributor

ELUTE commented Oct 7, 2015

// App Sync / Message retries, for timeout / busy problems
// Change to see if there is a temp or long term problem
// This is approximately number of seconds, so if set to 50, timeout is at 50 seconds
// However, this can vary widely - can be up to 6 seconds .... for 50, timeout can be up to 3 minutes
static const uint8_t APPSYNCANDMSG_RETRIES_MAX = 50;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants