-
Notifications
You must be signed in to change notification settings - Fork 39
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
[BUG] Search for Devicegroup with many members crashes #2345
Comments
Possible workaraound: If #members in DeviceGroup is larger than N, do not populate Availability columns. |
I guess there are multiple possible workarounds. Some considerations: Front-end fetch vs. back-end fetchThe front-end could populate the availability column dynamically through calls to a back-end API. NAV already does this in some parts of the front-end where we expect data fetches to be a lot slower than the actual page render. I would assume the main point of the device group page is to just list the group members. We don't need the availability data immediately, so it would be ok that this column takes a bit more time to populate. Batched fetchesThe Graphite server responds with 400 Bad Request, so it's not simply a timeout issue. It might be that the produced request just contains too many metric paths to be properly parsed by the Graphite web server (assuming the request is sent as an HTTP GET request, there is often a character limit to the URL, at which point the web server will chop off the remainder). As is done elsewhere in parts of the code, requests like these are batched. Instead of sending one mega-request, send batches of requests that fetch maybe 100 metrics each, then combine the results in the end. Proper error handlingIf the Graphite server does error out, that really shouldn't lead the whole view function to crash. Rather, as is done in other parts of NAV, the availability data should be filled with an error message about Graphite not being reachable or erroring out. One path that should be taken is: Verify what happens in the devicegroup view page if the Graphite server is unavailable. Is that error handled at all? If so, other types of errors should likely be handled in the same part of the code. |
@johannaengland You might also be able to reproduce the original issue by fuzzing some data into the database. Just having a group of 2500 faked netboxes may still produce the same error. |
NAV 5.2.1
Devicegroup StorGruppe have 2500 members. If I try to search for the group the page crashes due to no response from the Graphite-server.
Any workaround?
The text was updated successfully, but these errors were encountered: