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

Major data loss -- server doesn't appear to write data to disk properly #397

Open
2 tasks done
exscape opened this issue Jun 18, 2023 · 2 comments
Open
2 tasks done

Comments

@exscape
Copy link

exscape commented Jun 18, 2023

  • I am on the latest ActivityWatch version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS name and version: Windows 11, 22H2 (22621.1848)
  • ActivityWatch version: 0.12.2

Describe the bug

After a power outage at night, while the computer was in sleep/standby, all data for the past few days was lost. I started using ActivityWatch on June 10th and now have data for the these dates: 10, 11, 12, 13, 18.

To Reproduce

  1. Gather some data
  2. Kill aw-server-rust.exe
  3. Restart aw-server-rust.exe

All data gathered since the last graceful exit is lost when I do this, as mentioned above even days worth of data.

However, making things worse, I could reproduce this while testing, but not every time. I'm not sure what the difference between tries is. I'm also not sure if data is written properly but is corrupted, or simply not written at all.

Expected behavior

Data should be written to disk regularly, perhaps every 5 minutes or so, and persist even if power is lost/the server crashes etc.

@exscape
Copy link
Author

exscape commented Jun 18, 2023

Um, the data is now there. I have no idea what's going on, but the server has been running since 08:52:07 which is just before I submitted this bug report, and it didn't work when I submitted.

I am 100% sure it was missing (in the web UI) between multiple server restarts. The small bars that shows total activity per day were at height 0 for those days, and when viewing the daily activity, "No data" was all that was shown (just as it looks if you view a future date).

Perhaps this is rather a webui issue?

@exscape
Copy link
Author

exscape commented Jul 1, 2023

This happened again just now.

image

Every day from the one on the far left to and including today have 8+ hours of activity in them, that for whatever reason doesn't show up now.
I'm expecting it to show up again sooner or later since it did last time, but at the moment it appears entirely gone.

Interestingly, the server has been running since yesterday and it worked fine a few hours ago, so it has nothing to do with the server stopping/crashing as I first thought.

image
Screenshot taken just now, 2023-07-01 21:20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant