Skip to content

Command killed due to excessive memory consumption #6025

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

Closed
fmaussion opened this issue Aug 1, 2019 · 10 comments
Closed

Command killed due to excessive memory consumption #6025

fmaussion opened this issue Aug 1, 2019 · 10 comments
Assignees
Labels
Support Support question

Comments

@fmaussion
Copy link

Details

Hi! I'm here again, with our expensive conda builds (for the context, I already had performance related issues in the past: #5098 , #4432).

Our projects simply requires a lot of packages, and conda has become very hungry lately. Can I ask for a higher memory limit for the following projects? They all have the same package requirements:

Note that we would really love to be more efficient than that, but I really don't think we can. We also have working containers that could create our docs for you, but ReadTheDocs still doesn't accept arbitrary containers, right?

Thanks in advance!

Fabien

Expected Result

The docs being built.

Actual Result

Command killed due to excessive memory consumption

@humitos humitos self-assigned this Aug 1, 2019
@humitos
Copy link
Member

humitos commented Aug 1, 2019

I'd like to take a look at this. Probably next week if I have some time. I think conda gets crazy when using multiple channels :/

My first attempt was to upgrade the conda version that your docs are using to build it (which they said that had some "memory leak" improvements), but I saw that your oggm project is already doing that :(

@fmaussion where I can see what packages will be installed by oggm-deps?

@fmaussion
Copy link
Author

Thanks for your help @humitos !

your question motivated me to try to install the packages directly instead of via oggm-deps. Our builds are now working!

Change in env: https://github.com/OGGM/oggm/pull/835/files

Build log: https://readthedocs.org/projects/oggm/builds/9457124/

Thanks for your help and sorry for the noise...

@humitos
Copy link
Member

humitos commented Aug 1, 2019

@fmaussion awesome! thanks for sharing the results!

@fmaussion fmaussion reopened this Aug 7, 2019
@fmaussion
Copy link
Author

@humitos if you agree I'd like to reopen this. In a sister project (with exactly the same env.yml) we are experiencing the memory issue at the conda step:

https://readthedocs.org/projects/rgitools/builds/9481900/

Any idea on how to make it more efficient?

@humitos
Copy link
Member

humitos commented Aug 7, 2019

@fmaussion I've already add the flag to update conda on startup but it still fails.

Is it possible to remove all the dependencies that are not needed to build the documentation from the environment.yaml? For example, with a quick look, it seems that pytest is not required.

@humitos
Copy link
Member

humitos commented Aug 7, 2019

Also, you may want to consider to no use conda conda at all to build these documentation. You can just use simple pip to install all the dependencies (I think) --maybe not pyproj cartopy since requires a library but maybe it's not required to build the docs anyway. We suggest to do this when possible if the problem of OOM is hit. See https://docs.readthedocs.io/en/latest/guides/build-using-too-many-resources.html

@stsewd stsewd added the Support Support question label Aug 8, 2019
@fmaussion
Copy link
Author

fmaussion commented Aug 12, 2019

@humitos (and @ocefpaf and @jswhit because I think they might be interested in this). I just managed to do something that would have been impossible a year ago: I moved to a full pip install of packages such as rasterio / geopandas / pyproj / netcdf4 on RTD, and it works!

Here the requirements: https://github.com/OGGM/rgitools/blob/master/docs/requirements.txt

And the setup:

python:
   version: 3.5
   install:
      - requirements: docs/requirements.txt
   system_packages: true
   setup_py_install: true

The pinning of netCDF4 to a 2017 version were necessary for the netcdf4 library to work without an obscure HDF Error. [edit] The related issue: Unidata/netcdf4-python#962 [/edit]

After moving from pip to conda, then mamba, are we going back to pip again? 😉 Thanks to wheels, on linux this is at least an option.

@humitos
Copy link
Member

humitos commented Aug 12, 2019

@fmaussion I'm happy that you find out a way to make it builds the docs on Read the Docs without conda. I would love if you can keep me posted (or I can subscribe to an issue in your repo) since I'm interested on tracking this kind of issues on Read the Docs and collect some ideas, workflow problems, etc to continue thinking in different solutions.

@fmaussion
Copy link
Author

Dear Maintainers, dear @humitos - our builds started to fail because of timeout errors again, without any significant change on our side: https://readthedocs.org/projects/oggm/builds/10371200/

I you have time I'd be grateful about any advice about what's going on. Thanks!!!!

@fmaussion fmaussion reopened this Feb 3, 2020
@fmaussion
Copy link
Author

OK, nevermind - I think the problem is on our side, sorry for the noise.

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

No branches or pull requests

3 participants