Shutting down h2o gracefully

589 views
Skip to first unread message

Aschyle

unread,
Jul 26, 2016, 5:28:32 AM7/26/16
to H2O Open Source Scalable Machine Learning - h2ostream
Hi,

I'm currently running an R script that instantiates an h2o cluster on a Windows R2 2012 server and trains some model
and after successful training, I shutdown h2o with 
h2o.shutdown(F)
after instanciating it via 
h2o.init(ip = "localhost", nthreads = 6, max_mem_size = "18g")
For the sake of completeness, let me add that the script is part of a larger Luigi pipeline that is launched by executing 
a python script from the command line. The shutdown line is the very last line of my R script but I keep getting the following 
error messages in the logs:
2016-07-26 10:46:35.812 - INFO - Shutting down H2O cluster
[1] TRUE
2016-07-26 10:46:35.856 - SIMPLEERROR - No active connection to an H2O cluster. Did you run `h2o.init()` ?
Error in h2o.getConnection() :
  No active connection to an H2O cluster. Did you run `h2o.init()` ?
Calls: <Anonymous> ... .h2o.doREST -> stopifnot -> is -> h2o.getConnection
2016-07-26 10:46:35.870 - SIMPLEERROR - No active connection to an H2O cluster. Did you run `h2o.init()` ?
Error in h2o.getConnection() :
  No active connection to an H2O cluster. Did you run `h2o.init()` ?
Calls: <Anonymous> ... .h2o.doREST -> stopifnot -> is -> h2o.getConnection

This doesn't have any impact on my downstream tasks but it's a little annoying and has never happened by 
running a similar script via source('..'.) from RStudio.

I'm running H2O 3.8.2.3 on a Windows Server (2012 R2) via R 3.3.1 (64bit). I have planned to upgrade the
h2o version in the near future but I'm sticking to this release in order to compare models built with this one.

Any input on this would be appreciated !
Message has been deleted

mvh

unread,
Jun 24, 2020, 3:34:22 PM6/24/20
to H2O Open Source Scalable Machine Learning - h2ostream
I encountered this issue and was able to resolve it by removing all objects and calling garbage collection before shutting down H2O.

rm(list = ls())
gc()
h2o::h2o.shutdown(FALSE)

Reply all
Reply to author
Forward
0 new messages