Database file size limitation

Hey i would like to limit data base file ro 24 houra,
I used the recorder feature for purge data however it seems to be not working,
Any suggestion?

  purge_interval: 1
  purge_keep_days: 1

I have it… but file keeps growing…

Have you been restarting a lot?

Every time you restart HA the purge counter resets.

I do…
i will check this
however the txt log files is also keeps growing constantly…
any way to handle this as well?

That’s what log files do. You can limit what is logged though. See docs.

By adding the above comments…
recorder:

purge_interval: 2
purge_keep_days: 2

No, recorder is different to logger.

OK… so what is the solution ?

Limit your log file by changing what is put into it. Example, I only have it outputting errors.

You can remove logger all together too. This is what I use to only output errors:

logger:
  default: error
  logs:
    requests.packages.urllib3.connectionpool: critical 
    py.warnings: critical