Recorder error - sensor history stops

Hello, i run HA on rpi4b 4GB +32 GB SD card.
every time during the day everything runs fine and at night all the sensors are cut at the current value. However, everything works in lovelace, only the history gets stuck.
Then the energy panel and others don’t work for me.
After restarting everything, everything starts again and runs as it should during the day.

I got this error but I don’t know what to do to fix it

Logger: homeassistant.components.recorder.core
Zdroj: components/recorder/core.py:390
integrace: Recorder (dokumentace, problémy)
První výskyt: 11. května 2024 v 22:26:34 (1 výskyty)
Naposledy logováno: 11. května 2024 v 22:26:34

The recorder backlog queue reached the maximum size of 183381 events; usually, the system is CPU bound, I/O bound, or the database is corrupt due to a disk problem; The recorder will stop recording events to avoid running out of memory

this is what the sensor looks like, the sensor loads and rises, but its history stands. This happens with all sensors