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

Recorder: after "purge+repack" the DB is still abnormally huge #110490

Closed
ildar170975 opened this issue Feb 13, 2024 · 2 comments
Closed

Recorder: after "purge+repack" the DB is still abnormally huge #110490

ildar170975 opened this issue Feb 13, 2024 · 2 comments

Comments

@ildar170975
Copy link

ildar170975 commented Feb 13, 2024

The problem

Due to some issues with processing jinja templates in a custom card I observed this chain reaction:
huge CPU load -> rapidly increasing DB
The DB size jumped from ~1GB to ~8GB within a few hours.

Why these templates & card caused this huge CPU load - is another issue.
Why this huge CPU load caused a rapid constant flooding the DB - is also another issue (have no idea, may be some integration, stock or custom, reacted this abnormal way).

After HA reboot I called a "purge + repack" service:

service: recorder.purge
data:
  repack: true
  keep_days: 5

and after some time it gave me ~7GB file:
image
w/o any errors & messages in a Log (default logger settings).

I expected the DB file to be fixed and reduced in a size.
WTH this has not happened?

What version of Home Assistant Core has the issue?

2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@ildar170975 ildar170975 changed the title Recoreder: after "purge+repack" the DB is still abnormally huge Recorder: after "purge+repack" the DB is still abnormally huge Feb 13, 2024
@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (recorder) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of recorder can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign recorder Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


recorder documentation
recorder source
(message by IssueLinks)

@ildar170975
Copy link
Author

Closing, seems that DB was flooded by system_log_event records. They were fresh -> not deleted by the purge.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants