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

Mongo: Create index or look at query for findMeasurementsOfBoxesStream #149

Open
ubergesundheit opened this issue Feb 15, 2018 · 3 comments

Comments

@ubergesundheit
Copy link
Member

InternalServerError: errmsg: "Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit."

Maybe { sensor_id: 1, createdAt: 1 }

@noerw
Copy link
Member

noerw commented Aug 3, 2018

Just for the sake of documentation / clarification:
This missing index causes extreme slowness (30kB/s) for calls to GET /boxes/data with parameters that select measurements older than the latest n uploaded measurements, where n is to be determined.

@mpfeil
Copy link
Member

mpfeil commented Aug 28, 2018

@ubergesundheit question to your initial comment:
the index { sensor_id: 1, createdAt: 1 } caused the error?

@ubergesundheit
Copy link
Member Author

I think the index { sensor_id: 1, createdAt: 1 } could fix the slowness. Be aware though that adding an index without background: true will block the cluster.

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

No branches or pull requests

3 participants