Closed sebastian closed 3 years ago
The volume of data is so massive that even a 60 second timeout is not enough for it to complete. nginx times out the request. I suggest we limit the number of audit log entries to a big number starting from the latest queried date.
I see results are already paged, but the whole dataset needs to be sorted and processed first before cutting slices. Who knows how many millions of rows there are... maybe allow only a month slice at max?
Hm, can we catch the exception and say the dataset is too large to be computed, and recommend they slice the data better?
Hm, can we catch the exception and say the dataset is too large to be computed, and recommend they slice the data better?
Good idea. I'll see if this can be caught.
Deployed the PR branch to demo and seems to work: https://demo.aircloak.com/admin/audit_log?from=2000-01-01+13%3A30%3A09&to=2020-12-01+13%3A30%3A09
Takes a while to load, but on timeout shows the proper error.
But it keeps trying to fetch the data again... what's up with that?
Edit: Seems to happen when you load via direct URL. By regular navigation it works fine.
Live view does a hard reset when the page fails to load in time. The timeout can probably be adjusted, or we can lower the timeout for the audit log query. 15s is the default.
Takes a while to load, but on timeout shows the proper error.
Much better with this error!
Ok, made the UX much smoother by preventing the double load - liveview renders once for static HTML and on second render hydrates the view, causing 2 massive queries to run back to back.
https://demo.aircloak.com/admin/audit_log?from=2000-01-01+13%3A30%3A09&to=2020-12-01+13%3A30%3A09
And here's an example of a slow but successful load: https://demo.aircloak.com/admin/audit_log?from=2020-05-18+09%3A59%3A33&to=2021-06-18+09%3A59%3A33.946202Z
When I set the audit log from and to fields to be very expansive: say from 1st of Jan 2000 to January 2020, then the result is empty, and then the date popups no longer works.
Example: https://demo.aircloak.com/admin/audit_log?from=2000-01-01+13%3A30%3A09&to=2020-12-01+13%3A30%3A09