getsentry / getsentry/self-hosted
Default Redis setting causes Out of Memory crashes
- Dominant language
- Shell
- Stars
- 9.6k
- Forks
- 2k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 12
Description
### Environment
self-hosted (https://develop.sentry.dev/self-hosted/)
### Steps to Reproduce
1. Have plenty of CPU and RAM (16 cores) - 128gb
2. Have a busy server
3. Watch RAM usage by Redis climb to 70% of the total RAM
4. Other non Redis tasks tip the usage up to 100%
5. See that the OOM process clears down most of the processes
6. Find that you can't ssh on to the server, and after reboot; everything is a mess
### Expected Result
A busy server can run for multiple hours without infinity growing in RAM
### Actual Result
The busy server allows Redis to use most of the Ram, and other processes push it to 100%.
We have capped it at about 40% `redis.conf`
> maxmemory 45gb
I would suggest being able to set this as a sensible number by percentage would be great, and shipping at infinite is bad
> maxmemory 0
### Product Area
Settings
### Link
_No response_
### DSN
_No response_
### Version
25.11.1
Contributor guide
Research direction
Start with the self-hosted Redis configuration, especially redis.conf and the current maxmemory 0 setting described in the report. Review the self-hosted deployment documentation to determine how the default should be bounded or made configurable; done means a busy installation no longer allows Redis to consume unbounded memory and the setting is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, shell
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100