element-hq / element-hq/synapse

Sudden CPU spike to 100% and disk space decreasing fast - history purges

Open
#13,361 0 comments 0 reactions 0 assignees View on GitHub
A-Message-Retention-Policies A-Performance S-Tolerable T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#13361](https://github.com/matrix-org/synapse/issues/13361).

---

### Description

I have "btop" always running on my second monitor..
Unpinned a message in a room (from Element Web) and all of the sudden (not sure if related) server's CPU went crazy to 100% for a minute or so, until when I restarted the ansible playbook.

In this minute my DB has grown by 1GB more or less but I lost more than 2GB of space and I don't know where exactly.
After that I ran the rust-compress utility and did a FULL VACUUM and DB is back to normal now.

### Steps to reproduce

I don't have any step to reproduce, it happened out of the blue.

The only thing I was doing at that time was removing a pinned message from a room.

### Homeserver

woodpeckersnest.space

### Synapse Version

1.63.1

### Installation Method

Other (please mention below)

### Platform

I'm running the matrix-docker-ansible playbook on a Debian 11 VPS with 2GB RAM and 1 vCPU.

### Relevant log output

```shell
Jul 21 21:42:11 matrix-synapse[1303919]: 2022-07-21 19:42:11,764 - synapse.handlers.pagination - 274 - WARNING - purge_history_for_rooms_in_range-0 - [purge] purging events not possible: No event found (ts 1655840531742 => stream_ordering 155865)
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.