-
Notifications
You must be signed in to change notification settings - Fork 321
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
pkgdown consumed a huge amount (10+GB) of RAM on build_site() #783
Comments
Live update: now trying with pkgdown::build_site(new = F) In a terminal to see if that solves it - seems to be something to do with running in parallel. Update - crazy RAM use happened again - didn't solve it. |
In the name of reproducibility, I think others will be able to reproduce this by cloning this repo and running I suspect the culprit is https://github.com/geocompr/geocompkg/blob/master/vignettes/point-pattern-heatmap.Rmd which has some leaflet code. |
In any case, for users, all the vignettes can be built by running |
I also got this problem today. Vignette works well when knitted, but there is a memory leak while using |
Could you please build a minimal package that recreates the issue? The geocompkg package has too many dependencies to debug this effectively. |
I think it was the number of vignettes, not the dependencies of the package the website of which we were trying to build, that caused the issue. Agree hard to debug. |
FYI for anyone else reading this issue: run
one-by-one and it seems to be fine. All good! |
@Robinlovelace did you ever resolve this issue (other than having to build each article individually, which I don't want to do as part of our CI/CD pipeline)? I see @hadley closed the issue, but I don't see details of a resolution. I'm having the same issue: vignettes knit by themselves NP and I can build each article manually by itself, but when |
Hi @samvaltenbergs I think the problem is still there. We (@Robinlovelace and I) haven't found a solution yet.. |
To confirm: no I didn't find a solution. I'm not 100% sure what led to the issue being closed. Any info on that @hadley would be appreciated. I think one thing that would help developers would be reproducible examples. |
If you are running very large vignettes it is going to be very difficult to debug this, and I would also advocate for breaking these up anyway (or at least trimming your example data sets down a bit). If this is a bug, it's probably reproducible by a very short vignette. |
Thanks for the feedback. Will try to create a reproducible example. Anyone else finding issues with memory usage: please add reproducible examples of what happened. |
Hi @jayhesselberth, I spent an hour a few weeks trying to create a reproducible short example and I was unable to do so... |
It was closed because we don’t have a reprex and it seems unlikely that the root cause is pkgdown. |
I think it's possible to create a reproducible example. May be in git clone git@github.com:geocompr/geocompkg
cd geocompkg
R
pkgdown::build_site() |
@hadley, @Robinlovelace and @Nowosad I understand that it's difficult to troubleshoot without a reproducible example, but unfortunately I can't share the vignettes due to corporate policy (The Man)... I can show a screenshot that demonstrates the failure signature: building the articles by themselves works okay but when What has me scratching my head is that the vignettes are all very simple: the only piece of R code that is executed across the seven vignettes is a call to What is even more strange is that the "11Gb failure" only occurs the first time Any ideas? |
Reproducible example verified: Heads-up @hadley and @jayhesselberth please try to reproduce. |
Further evidence that this is an issue with # build site:
pkgdown::build_home()
# build vignettes one by one, e.g.
pkgdown::build_article("sea-level-rise")
pkgdown::build_articles()
# build all articles
articles = list.files(path = "vignettes/", pattern = ".Rmd")
articles = gsub(pattern = ".Rmd", replacement = "", articles)
for(i in articles) {
pkgdown::build_article(i)
} |
@Robinlovelace that video doesn't really add anything. All |
I have started the process of installing all the geocompr dependencies so I can reproduce locally. |
Sure. 1st time I've used the function. Hope the output is useful (means nothing to me)!
|
The good news: with the work-around I've managed to re-build and update the site: https://github.com/geocompr/geocompkg Heads-up @samvaltenbergs that work-around #783 (comment) may be of use if |
btw @hadley apologies for all the dependencies. |
After running
|
If I run it again, it fails later: Reading 'vignettes/solutions06.Rmd'
Error in CPL_geos_is_empty(st_geometry(x)) :
Evaluation error: IllegalArgumentException: Points of LinearRing do not form a closed linestring. |
Thanks for reporting. I've raised an issue here: geocompx/geocompkg#2 |
I'm not sure how or why this happened but I'm confident it's pkgdown because I tried it twice (both times it crashed my R session).
Here's the crash message:
Here's the dramatic memory use log on Ubuntu:
With:
Created on 2018-08-13 by the reprex package (v0.2.0).
The text was updated successfully, but these errors were encountered: