Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource Usage / Large Document Size #14

Open
hackel opened this issue Mar 17, 2018 · 0 comments
Open

Resource Usage / Large Document Size #14

hackel opened this issue Mar 17, 2018 · 0 comments

Comments

@hackel
Copy link

hackel commented Mar 17, 2018

The way Sentry works with Laravel-MongoDB is not very efficient for storing group membership because of the way the belongsToMany relationship is handled without using a pivot table. This is a rather serious flaw in this combination. For example, one of my projects has a default user group that has over 150k elements in its "user_ids" array. The document size is already up to 5 MB, and eventually might hit the MongoDB hard size limit of 16 MB per document. In addition, it requires loading the entire document at once, as opposed to being able to only load those records we are concerned with. Presumably this all is getting cached in RAM as well, leading to excessive memory usage.

The best solution is probably to change the relationship to User hasMany Groups, which means any search for users in a particular group is going to be slow, but seems like a worthy trade-off. Indexing might even mitigate this issue.

Is there any interest in working on this? Sentry is very old and unsupported now, but until I can get a budget to replace it, I'm stuck. I welcome any thoughts on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant