Version/Environment (if relevant):
Domino version 4.6.2, possibly other 4.6 versions
Issue:
When publishing model API's written in R, you may see the following error:
Error in stopOnLine(lineNum, file[lineNum], e) : ec2.internal model-2348234-234s34 model-2
Error on line #1: '.Domino.dir <- getSrcDirectory(function() {})' -
Error in stopf("Cannot create %d parallel PSOCK nodes. Each node needs one connection but
there are only %d connections left out of the maximum %d available on this R installation", :
Cannot create 128 parallel PSOCK nodes. Each node needs one connection but there are only
124 connections left out of the maximum 128 available on this R installation ec2.internal
model-2348234-234s34
-0800 Calls: plumb ... tryCatchList -> tryCatchOne -> <Anonymous> ->
stopOnLine c2.internal model-2348234-234s34
-0800 Execution halted
Root Cause:
Plumber's R code uses a package called parallely. When parallely determines number of available cores it not respect cgroup settings used for container CPU limits. Therefore, even if only given a fraction of total capacity, an R model deployed on a >= 128 core system will attempt to create 128 workers and fail when there are none available.
Resolution:
Please try adding this snippet to your environment's Dockerfile:
ENV R_PARALLELLY_AVAILABLECORES_SYSTEM=4
If that doesn't solve the issue, please reach out to Domino Support.
Notes/Information:
Domino's recent environment images will include this snippet by default:
ENV R_PARALLELLY_AVAILABLECORES_SYSTEM=4
The final fix is scheduled to be included in Domino version 5.2
Comments
0 comments
Please sign in to leave a comment.