Weird caching issues on address pages
Closed this issue · 6 comments
There are a number of oddities when trying to load up an address page, e.g. https://explorer.blockstack.org/address/stacks/SP1P72Z3704VMT3DMHPP2CB8TGQWGDBHD3RPR9GZS
- Directly hitting that URL generally results in an empty page.
- Searching for the address in the search bar sometimes results in a 404 from the explorer-api backend (see screenshot)
- Re-doing the search directly sometimes works. But then, if you simply refresh the page (equivalent to directly hitting the URL), the page renders empty again
All the data seems correctly reflected in the backend database, so this feels very much like client-side caching issues or other bugs in the explorer app.
I believe @wileyj also reproduced all the above after clearing the explorer cache.
to add some more details: all data in the DB's appear to be accurate, I'm able to query transactions listed at that address.
i also cleared the redis cache, at which point i was able to navigate to the address page by searching...but as diwaker noted, refreshing the page after it loads returns the 404.
interestingly, on refresh there is nothing in the logs whatsoever. only on a fresh page load.
one thing to note is that the page size for this address is a little large, roughly 300k, page load time when it does work can take up to 30s.
Yeah, we should look into paginating transactions or loading them on demand for these kind of pages.
Yep, I think this is due to a lack of pagination and a timeout issue. On it
@timstackblock I'm moving this to QA. This bug was caused by too much data being sent/cached on the backend, causing timeouts and other issues. Truncating the TX list to 50 entries at most has stabilized this issue.
Part of the issue was fixed with truncating the TX list to 50 but I am still seeing something strange when I refresh the page.
The latest transaction for 945 STX disappears when the page is refreshed
Please see the video below
https://screencast-o-matic.com/watch/cqXj2nUQYy
Searching the address in the search box gives me the latest transactions
But Refreshing the page causes the latest transactions to disappear from the top of the page