History update fails with RPC Error

Issue #261 closed
Stefan Ritt created an issue

When I keep history pages open over a remote network connection, I sometimes get RPC error such as this one:

Reloading the page fixes this. This is probably a time-out of the AJAX call and should be handled in the mjson_rpc layer, like automatic retry for a few times.

Comments (6)

  1. dd1

    I agree, http status 503 we should probably retry.

    Looking at https://en.wikipedia.org/wiki/List_of_HTTP_status_codes, I would say, for all 500-series status codes we should do a retry. None of them are valid permanent errors when our midas web pages are talking to our own midas mhttpd.

    In our “recommended” configuration, we always talk to apache httpd, and again, all 500-series status codes look safe to retry.

    One special case is when mhttpd is not running, apache httpd probably returns status 503, and this, too is safe to retry.

    One case where to retry is the correct action is when mhttpd or apache httpd is being restarted.

    K.O.

  2. dd1

    I do not like to retry “secretly”, I need to report retry attempts to the user somehow so they see what is happening and why the web page is not updating. Any ideas on this? K.O.

  3. Stefan Ritt reporter

    Well, reporting RPC errors is what we have already now. Users have to click each time this happens. I usually do a couple (5, 10?) of retries, and only of all of them fail, I report back to the user. Everything else is annoying.

    Or at least have a possibility to silence errors 1-9. For use during debugging we want to see all errors, I agree. But for the user that might be disturbing. So the first error should read “Ok to suppress further errors of this type?”

  4. dd1

    Confirmed, restart of mhttpd causes “status 503” popup dialogs. I agree, we should retry them automatically. I usually run retries with following timeouts: 1, 2, 4, 8, etc, 60, 60, 60, … seconds. I will try to put the notification same place at the top where we show “connection to server is broken”. K.O.

  5. Log in to comment