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

Met some memory limit of MongoDB #11

Closed
gtoffoli opened this issue May 30, 2019 · 5 comments
Closed

Met some memory limit of MongoDB #11

gtoffoli opened this issue May 30, 2019 · 5 comments

Comments

@gtoffoli
Copy link

Recently I got many times the error message "Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.", while using the Query Builder, more precisely when trying to create interactively a clause OR-ing many object ids. Said message is emitted by LL when constructing an option list with items representing automatic continuations of the user input. See also: https://stackoverflow.com/questions/54396869/mongo-exec-error-operationfailed-sort-operation-used-more-than-the-maximum-3

I don't know if someone can change the LL configuration appropriately. However, the suggestion "or specify a smaller limit" confuses me a bit.

@michzimny
Copy link
Member

We could adjust the configuration but we would need to investiage it deeper to be sure what should be changed.

We could also create indexes that are recommended by the LL documentation that we do not have in our instances.

See also #10. Perhaps, we should first upgrade the LL app to 3.x and also upgrade the underlying Mongo db (LL v.3.x requires a newer version of Mongo than we currently have) in order not to fight this issue more than once.

@gtoffoli, any suggestions are welcomed.

@gtoffoli
Copy link
Author

Thank you Michal: I think it's quite likely that creating the indexes recommended by the documentation would solve the problem.

By the way, I met a similar problem in querying LL through the HTTP API; but in that case the cause is the limited length of the query-string encoding the MongoDB query in a GET request. The problem can only be circumvented by redesigning the algorithm.

@michzimny
Copy link
Member

@gtoffoli, so I just created the indexes suggested by the docs, for both Up2U instances. Could you please check if it solves the issue?

@michzimny
Copy link
Member

@gtoffoli, have you experienced similar problems after my changes?

@gtoffoli
Copy link
Author

gtoffoli commented Aug 1, 2019

Yes, I've experienced similar problems, but much less frequently. Thank you. I think that you can close this issue for now.

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