Skip to content
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

Graph is empty after first reload of the page (on ~daily basis) #1333

Open
pygospa opened this issue Apr 25, 2024 · 7 comments
Open

Graph is empty after first reload of the page (on ~daily basis) #1333

pygospa opened this issue Apr 25, 2024 · 7 comments
Labels
bug Something isn't working seeking contributor Appropriate for an outside contributor to do and requires less context on the ccf methodology

Comments

@pygospa
Copy link

pygospa commented Apr 25, 2024

We have CCF installed on AWS and are experiencing a rather strange behavior in the Cloud Usage chart: The very first time one of our devs accessed the site, we had a "normal" chart.

image

But any other dev got an empty graph. We've tried this on different Linux distributions and with different browsers. The very first dev also lost the graph, once reload was hit, or the exact page was opened in a second tab; so we tried the incognito mode as well, to make sure there isn't some client side issue with stored data. A day later we where once again able to see the curve for the very first time of opening the page.

image

We tried debugging this ourselves and had following findings:

  • The date-range changed; on the first screenshot (with graph), the x-Axis shows the entire date range, on the second one it cuts of the range after March 28th.
  • The data points are still there; we could make them visible via moving the mouse over the graph, see the tool tips, and even locate the data points on the graph.
  • Using the browsers devtools we found that there is an element .apexcharts-canvas .apexcharts-element-hidden with opacity = "0"; switching this to 1 will show at least the data points.
  • When manually making the points visible by overriding the opacity settings, and comparing the graphs we found that all data points where duplicated.

image

This points to the issue #1069 , from March last year; however the solution suggested there was to use Node 18. We are currently using release: 'release-2024-02-11'; and we rechecked that Node 18 is used by client and server, which is the case.

So, though the symptoms are identical to issue #1069 , the root cause must be somewhere else.

@jochen-schuettler
Copy link

There are 2 instances from the same domain, which have slightly different behavior:

  • One is as described above. The doubling of points correlates to half the time range, e.g. choosing 1M gives 15 days.
  • The other doesn't have double points and half time range. But otherwise the issue is the same.

@jochen-schuettler
Copy link

Also, to validate against issue #1069, we tried CCF on an entirely separate AWS account, setting it up by Terraform. (The one above was set up using Helm). Regardless of node 16, 18 or 20, there is no issue, i.e. the graphs are always visible.

@ddias00
Copy link
Contributor

ddias00 commented Apr 26, 2024

"I'm facing the same issue.

I'm using Helm for deployment on EKS with the release version release-2024-02-11."

first run

Anotação 2024-04-26 080243

second run

image

logs:
cloud-carbon-footprint-api-5bcd879796-h9xcr_cloud-carbon-footprint.log

"It seems like a caching issue."

@ddias00
Copy link
Contributor

ddias00 commented Apr 26, 2024

#1069

It seems like my issue is identical to that one, but I'm using the latest image from the Docker Hub repository and still encountering the problem.

@ddias00
Copy link
Contributor

ddias00 commented Apr 28, 2024

I solved it using the cache in Mongo Atlas.

@jochen-schuettler
Copy link

jochen-schuettler commented May 2, 2024

It turned out that the cache was disabled on our own account, where the problem was not visible. On activating the cache the problem appears, unrelated to node version. I guess if we follow https://github.com/ddias00 's advice and utilize MongoDB, it will let the problem vanish again.
So - The problem is only with local cache, which will be deprecated, but is still the default, as per documentation!

@4upz
Copy link
Member

4upz commented May 16, 2024

@pygospa Thanks for opening this issue and for making it so detailed! Big thanks to everyone on the collaborative troubleshooting.

From first impression, this definitely sounds like a cache-specific issue mixed in with some weird behavior from Apex charts. @jochen-schuettler I completely agree with your point that even though the local cache method is no longer supported, this is still a problem since it's the default option. I believe it has come up enough that warrants an investigation into the root cause alongside a fix.

@4upz 4upz added bug Something isn't working seeking contributor Appropriate for an outside contributor to do and requires less context on the ccf methodology labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working seeking contributor Appropriate for an outside contributor to do and requires less context on the ccf methodology
Projects
Status: 📝 Backlog
Development

No branches or pull requests

4 participants