Error in initializing H2O in R - cannot allocate memory

262 views Asked by At

I was trying to run an automl model on a linux server with 32 GB RAM using h2o in R on a data set having 5 million records and 70 features.

Here's a code that I was trying to run:

aml <- h2o.automl(y = y, x = x, training_frame = train, seed = 123)

I got this error:

|====                                         |   8%Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page,  :   Unexpected CURL error: Recv failure: Connection reset by peerError in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = urlSuffix,  :   Unexpected CURL error: Failed connect to localhost:54321; Connection refused

And, then after restarting the R session and doing all the clean up when I tried to initialize h2o using:

h2o.init()

It gave me an error:

H2O is not running yet, starting it now...Error in system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE) :   cannot popen '/usr/bin/which 'java' 2>/dev/null', probable reason 'Cannot allocate memory'

Does anyone know how to fix it. I couldn't find any solutions online yet.

EDIT 1

By restarting the server; h2o got was getting initialized with h2o.init. And, by using keep_cross_validation_models = F in h2o.automl; model generation got completed to 100%.

But, I started getting this new error after h2o.automl progress bar reached 100%.

aml <- h2o.automl(y = y, x = x, training_frame = train, keep_cross_validation_models = F, seed = 123)

|======================================================| 100%ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/3/Jobs/$03017f00000132d4ffffffff$_8d3c6f4c4fd73944d1ce4624042d44a9) Error: parse error: premature EOF                                                            (right here) ------^

EDIT 2:

The problem got solved by rebooting the server and initializing h2o by adding max_mem_size = "12g" option.

0

There are 0 answers