goauthentik / goauthentik/authentik

Forcibly Limit Notifications to Max (like 1000) Per User

Open
#7,802 2 comments 0 reactions 1 assignee Claimed by @BeryJu View on GitHub
enhancement
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

**Is your feature request related to a problem? Please describe.**
Notifications (shown on the user interface around the top right corner), sometimes pile up on accident due to a reoccurring error. For example I have over 100,000+ notifications for my admin users. This becomes problematic when you need to clear them or even remove the user (which clears them - https://discord.com/channels/809154715984199690/809154716507963434/1179886907275096215 ). A single clear all task can spin forever it feels like or even a remove user request.

While removing the user, the system also becomes overly taxed, maxing memory usage on my server for instance.

**Describe the solution you'd like**
Force notifications to a max of 1000 notifications and even provide a admin settible setting for all users (using 1000 as default) for max number of notifications per user. There's no reason for a user to need even more then 100 in reality, since the user probably is not gonna read all of them. Especially if theres far more then 1000. This should also save space as well remove any bottlenecks created while trying to remove a user.

I imagine this issue will become even more evident when someone needs to remove a old admin user which may have accidently tons of notifications piled up and now it feels impossible to remove the user since it taxes the whole system to do so.

**Describe alternatives you've considered**
Removing the user, however the clearing of notifications still takes forever.

**Additional context**
As of this ticket, I am trying to remove a user with 100,000+ notifications and it's taking more then 15 minutes. The server was sitting at 2 gbs of memory usage but has jumped to 3.5 gbs of usage out of 4 gbs.

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.