| author | anmunde |
|---|---|
| ms.author | anmunde |
| ms.reviewer | rothja |
| ms.date | 04/07/2021 |
| ms.service | sql |
| ms.subservice | machine-learning-services |
| ms.topic | include |
If you're using the R runtime provided as part of SQL Server Machine Learning Services by setting R_HOME to C:\Program Files\Microsoft SQL Server\MSSQL15.<INSTANCE_NAME>\R_SERVICES when you register the language extension, you might run into the following error upon executing any external custom R script with sp_execute_external script.
Error: cons memory exhausted (limit reached?)
To resolve this issue:
- Set the environment variable
R_NSIZEindicating the number of fixed sized objects (cons cells) to a reasonable value, for example,200000. - Restart the Launchpad service and retry the execution of the script.