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

Bug: Graphs not being updated #1524

Open
Cerebellum90 opened this issue Dec 9, 2024 · 20 comments
Open

Bug: Graphs not being updated #1524

Cerebellum90 opened this issue Dec 9, 2024 · 20 comments
Labels
🐛 Bug Something isn't working

Comments

@Cerebellum90
Copy link

Describe the bug
Graphs not being updated after new records (balance/transaction) are being added

To Reproduce
Steps to reproduce the behavior:

  1. Add new balance entry on today's date (9-dec-2024)
  2. Graph still showing the previous entry date as last graph date.

Expected behavior
Expected the graph to refresh after adding/mutating an entry.

What version of Maybe are you using?
v0.2.0-alpha.2 (latest [sha-a9daba16c15a246737b417869cda42ec6de90258])

What operating system and browser are you using?
Win11/Chrome

Screenshots / Recordings
image

@Cerebellum90 Cerebellum90 added the 🐛 Bug Something isn't working label Dec 9, 2024
@mamarguerat
Copy link

Same issue for me, I had to restart the container to have an updated graph

@zachgoll
Copy link
Collaborator

zachgoll commented Dec 9, 2024

@Cerebellum90 I have a fix coming for this in my next major PR. There are a few things going on here related to timezones and balance syncing logic. Should have that in today or tomorrow.

@mikr13
Copy link

mikr13 commented Dec 9, 2024

Hey @zachgoll thanks for sharing insight on this issue. Are you planning on cutting any new release soon?
I can see a lot of improvements added that'll be good to try out in self-hosted versions.

@zachgoll
Copy link
Collaborator

zachgoll commented Dec 9, 2024

@mikr13 yes, should have one out this Friday.

You can check out the "latest" commit package before then though to get the changes I'll be pushing today/tomorrow.

@mikr13
Copy link

mikr13 commented Dec 9, 2024

Oh awesome. Let me try it out in my local then.
I'm trying to learn full stack Ruby coding with this repo as well! 😅

@zachgoll
Copy link
Collaborator

It may require 1 manual sync for affected accounts, but after doing so, this should be fixed on the latest commit.

@Cerebellum90
Copy link
Author

The fix from last week did work, and graphs were successfully updated after adding/mutating transactions/balances.
But now the issue has returned for me.
I updated all the balances of my accounts, but the graphs are still showing the 13th of november.

@zachgoll
Copy link
Collaborator

@Cerebellum90 do you mean December 13th? Or November 13th?

Could you try updating your timezone in your profile settings? This is what we use to determine the date range of the graph now to account for timezone differences.

@Cerebellum90
Copy link
Author

@zachgoll correction, december.
Added a new entry for today (17th) and graph still showing 16th.
When the selfhosted container restarts or retrieves a new image version, the graph are updated. but not when adding an entry.
Also after updating my timezone (to Europe/Amsterdam), and testing with a new entry, still no luck.
image

@zachgoll
Copy link
Collaborator

@Cerebellum90 any chance you could post your docker compose config? If the graphs aren't updating at all after entries are added, that tells me that your background jobs are not running. Do you have this in your config?

GOOD_JOB_EXECUTION_MODE: async

Also, could you try hitting the sync button now that you've updated your timezone to perform a full sync?

@Cerebellum90
Copy link
Author

Cerebellum90 commented Dec 17, 2024

@zachgoll here's my config;
`services:
db:
image: postgres:17
container_name: Maybe-DB
hostname: maybe-db
mem_limit: 1g
cpu_shares: 1024
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "maybe", "-U", "maybeuser"]
timeout: 45s
interval: 10s
retries: 10
volumes:
- /volume1/docker/maybe/db:/var/lib/postgresql/data:rw
environment:
POSTGRES_DB: maybe
POSTGRES_USER: ****
POSTGRES_PASSWORD: ****
restart: unless-stopped

maybe:
image: ghcr.io/maybe-finance/maybe:latest
container_name: Maybe
healthcheck:
test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
volumes:
- /volume1/docker/maybe/storage:/rails/storage:rw
ports:
- 5488:3000
restart: unless-stopped
environment:
SELF_HOSTED: true
RAILS_FORCE_SSL: true
RAILS_ASSUME_SSL: true
GOOD_JOB_EXECUTION_MODE: async
SECRET_KEY_BASE: ****
DB_HOST: db
POSTGRES_DB: maybe
POSTGRES_USER: ****
POSTGRES_PASSWORD: ****
depends_on:
db:
condition: service_healthy`

Also, as of this moment, they're all updated to show until the 17th of dec.
So throughout this day, it has added the 17th as last date. Not sure what triggered that. This morning, it was still showing graphs until max(date) of any balance/transaction-entry. In other words, the gap between the current date and the end-date of the graph can be > 1 day, in case I haven't added an entry for a longer period (as shown in the screenshot of the initial post).
Since for all my accounts, the 17th is now present in the graph, if I add or mutate the balance entry for today, the graph IS being updated instantly.

@zachgoll
Copy link
Collaborator

@Cerebellum90 gotcha. My guess is that setting your timezone fixed the issue, but not immediately due to stale balances that needed to be cleaned up with a full account sync.

Check it tomorrow morning (your time) and see if the issue still persists. If it does, then we have a timezone issue here. But off the top of my head I don't see what could be causing it since we're calculating the series of balances based on the user-defined timezone now.

@Cerebellum90
Copy link
Author

Cerebellum90 commented Dec 18, 2024

@zachgoll alright, I'll first start with a full account sync then, and will see if tomorrow (19th) it all works again.
As of today (18th), my graphs are still showing 17th. after adding an entry for today (see below).
Also, the amount of the balance update says 0, but after a page refresh, it shows the correct delta with with the previous row.
image

@Cerebellum90
Copy link
Author

@zachgoll tried again today, still no luck. Still showing 17th.
image

@zachgoll
Copy link
Collaborator

@Cerebellum90 and you hit the sync button and it's still doing that?

Can you share any relevant logs? There must be either a config issue with Docker or some obscure bug that your instance is hitting.

@Cerebellum90
Copy link
Author

@zachgoll correct, tried syncing multiple times, all accounts from the settings page, of individual.
Where can I send the logs to? (Since there's some sensitive data in it)

@zachgoll
Copy link
Collaborator

@Cerebellum90 we don't have a great way to share logs for self-hosted users at the moment. Any chance you could blur out or omit sensitive info and just share things that look relevant to this failure? You could also dump your entire log trace into an LLM and have it parse through and find relevant errors

@Cerebellum90
Copy link
Author

@zachgoll hereby the logs, with anonymized data.
In case you'll need more logs/information, please let me know. Thank you for your time so far
Maybe.txt

@mamarguerat
Copy link

I still have the issue, the graphs are not updating, and they are showing 8th of January instead of 10th of January. The only thing that updates the graphs is a reboot of the maybe container.

@Cerebellum90
Copy link
Author

@mamarguerat @zachgoll exactly. Reboot of the container will help. But when the container stays running, every next day the graph will not be updated

@zachgoll zachgoll reopened this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants