element-hq / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://element-hq.github.io/synapse
GNU Affero General Public License v3.0
1.24k stars 153 forks source link

My HS has accumulated thousands of unreferenced state groups #3364

Open matrixbot opened 8 months ago

matrixbot commented 8 months ago

This issue has been migrated from #3364.


... which are filling up my disk :(


To check if you are also affected, run this query:

select count(*) from state_groups sg
    left join event_to_state_groups esg on esg.state_group=sg.id
    left join state_group_edges e on e.prev_state_group=sg.id
where esg.state_group is null and e.prev_state_group is null;

if you see numbers in the thousands, then it is this issue. Otherwise, you're not affected by this issue.

n-peugnet commented 1 month ago

Is Erik Johnston's tool still the best way to get rid of the unreferenced state groups? Because they indeed are filling up my disk, and the repo has not been touched for 2 years.