[general] Troubleshooting strategy for branched pipelines #1227
Replies: 4 comments 6 replies
-
I tried your example on our on-prem installation of Posit Workbench, both in the regular R console in a fresh terminal tab, and the pipeline completes normally. You might have outdated or incompatible versions of If that doesn't work, let's try to peel back layers. What happens using long_running_function <- function(idx){
Sys.sleep(10)
return(idx**2)
}
controller <- crew::crew_controller_local(workers = 2)
controller$start()
results <- controller$map(
command = long_running_function(ids),
data = list(long_running_function = long_running_function),
iterate = list(ids = seq_len(2L))
)
results
# # A tibble: 2 × 12
# name command result seconds seed algorithm error trace warnings launcher worker instance
# <chr> <chr> <list> <dbl> <int> <chr> <chr> <chr> <chr> <chr> <int> <chr>
# 1 1 <NA> <dbl [1]> 10.0 NA <NA> <NA> <NA> <NA> 951fbdd… 2 16a0d2e…
# 2 2 <NA> <dbl [1]> 10.0 NA <NA> <NA> <NA> <NA> 951fbdd… 1 3c5679b…
unlist(results$result)
#> [1] 1 4
controller$terminate() If library(processx)
log <- tempfile()
process <- process$new(
command = file.path(R.home("bin"), "R"),
args = c("-e", "Sys.sleep(10)"),
cleanup = TRUE,
stdout = log,
stderr = "2>&1"
)
process$wait()
readLines(log)
process$get_result() |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back to me. I certainly seemed to be out of date as the messages changed, but this didn't seem to solve the problem.
Crew works without targets:
|
Beta Was this translation helpful? Give feedback.
-
Tried this and got around 50Mb from
Yes, I made this reproducible example because I originally noticed a similar pattern was happening with crew's sge clustering. Under tar_make, each individual batched target was taking ~1.5 minutes, and |
Beta Was this translation helpful? Give feedback.
-
Just wanted to provide an update for any future readers: shortly after I created this thread, there was a notification that my company's cluster had experienced a service degradation of some kind. After the outage, the code ran well. I would guess this was the root cause of this strange issue. |
Beta Was this translation helpful? Give feedback.
-
Help
Description
I wanted to start a rather open-ended discussion here. On my company's server, I've run the following:
After defining this as
_targets.R
, I've runtar_make(use_crew=TRUE)
to build out the results. On three tries, I've gotten the following outputs:Last error: ! Native call to processx_exec failed
Last error: {crew} worker 1 launched 5 times in a row without completing any tasks.
Expectation: The pipeline should build in around 12-15 seconds after dispatching two forked processes that complete in 10 seconds each.
How should we make sense of what is going on?
Beta Was this translation helpful? Give feedback.
All reactions