Skip to content

nothing displayed when app takes >4s to process reports #2745

@rade

Description

@rade

Apply

diff --git a/app/router.go b/app/router.go
index 414f45f9..40075048 100644
--- a/app/router.go
+++ b/app/router.go
@@ -159,6 +159,9 @@ func RegisterReportPostHandler(a Adder, router *mux.Router) {
                        respondWith(w, http.StatusInternalServerError, err)
                        return
                }
+
+               time.Sleep(5 * time.Second)
+
                w.WriteHeader(http.StatusOK)
        }))
 }

and then run scope normally with scope launch and point a browser at it.

Initially this will show containers as expected, but after ~1m the "nothing to show" message appears. This then remains there but for a ~15s periods approximately every minute, when containers are shown.

The problem is as follows: The client has an http timeout set to 4s, and exponentially backs off on all errors, including timeouts, up to a max backoff of 1m. Since the app displays data from aggregating reports over a 15s window, any time the client backs off for longer than that window, results in no data being available.

Solution: we shouldn't be backing off on timeouts.

Metadata

Metadata

Assignees

Labels

bugBroken end user or developer functionality; not working as the developers intended it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions