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

Max mongo document size #268

Open
ezefire opened this issue Aug 1, 2018 · 2 comments
Open

Max mongo document size #268

ezefire opened this issue Aug 1, 2018 · 2 comments

Comments

@ezefire
Copy link

ezefire commented Aug 1, 2018

Hi,
We noticed that the collection 'roles' adds the user id to the document of its rol. But on mongo there is a max size for each document and adding every userId to that same document could cause that document arrives to that max size. The same happens in the collection 'meta' where all user ids are stored under the same document.

@timqian
Copy link

timqian commented Dec 31, 2018

Actually met this issue in our production database,
screen shot 2018-12-31 at 12 24 14 pm

There are too many roles, and met MongoError Resulting document after update is larger than 16777216 when we trying to add more roles

@timqian
Copy link

timqian commented Jan 14, 2019

A simple temp solution worked for us without changing the code is removing roles in the large meta document. roles in the big document is used to remove all the permissions associated to ONE resource when removing resource. ref1; ref2;
So, with this solution, the issue is we will have unnecessary permissions still in db when resource got deleted.

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

2 participants