Cannot purge and repack MariaDB

Hi, I cannot purge and repack MariaDB
It is 3,7GB, I excluded many sensors and automations, but purge and repack service do not works… I see this error on log…

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:356
Integration: Recorder (documentation, issues)
First occurred: 12:13:02 (2 occurrences)
Last logged: 15:17:43

  • Error executing purge: (MySQLdb._exceptions.OperationalError) (2013, ‘Lost connection to MySQL server during query’) [SQL: SELECT states.state_id AS states_state_id FROM states WHERE states.last_updated

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:72
Integration: Recorder (documentation, issues)
First occurred: 12:13:02 (2 occurrences)
Last logged: 15:17:43

  • Error executing query: (MySQLdb._exceptions.OperationalError) (2013, ‘Lost connection to MySQL server during query’) [SQL: SELECT states.state_id AS states_state_id FROM states WHERE states.last_updated