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

automatic pagination? #25

Closed
ltalirz opened this issue Dec 18, 2019 · 2 comments
Closed

automatic pagination? #25

ltalirz opened this issue Dec 18, 2019 · 2 comments

Comments

@ltalirz
Copy link
Member

ltalirz commented Dec 18, 2019

hi @CasperWA
I'm in the process of setting up some automatic monitoring of the optimade servers on materials cloud to make sure that they are up.

While doing so, I realized that the default response to
https://dev-aiida-dev.materialscloud.org/optimade-sample/optimade/structures
is ~2MB in size.

Would it perhaps make sense to adjust the default pagination in such a way that the default response does not exceed 100KB?

@CasperWA
Copy link
Collaborator

Sure. This can be set in the config.json file here.
The next variable "db_page_limit" is the total number of results that is allowed by the DB backend (when using the query parameter page_limit=<some-integer-value>.

@CasperWA
Copy link
Collaborator

This has been solved by lowering the default page_limit to 15 and introducing a page_limit_max in aiida-optimade as well as "upstream" in optimade-python-tools.

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