Let me start by saying that I primarily work with JavaScript, but recently I've delved into a project involving R/DeployR, so my expertise in this area is still limited to what I've learned in the past few months.
In this project, I am using the DeployR JavaScript API in Node.js to connect to DeployR Open Edition 7.4.1.
Recently, I encountered an error that has puzzled both myself and the data engineer I'm working with. This issue seems to arise only when handling a large amount of data, specifically databases with more than 28,000 rows.
To gain more insights into the process and pinpoint the issue, I decided to integrate PubNub for logging purposes. Here's a brief summary of what's happening and the specific problem I'm trying to resolve.
Process: The Node.js application sends a request through the JavaScript API to run an R Script that processes the data using various algorithms. The R script then iterates through each algorithm with a for loop.
Issue: The problem arises during the third iteration of the loop when DeployR sends an error back to the JavaScript API, which then forwards the error message as JSON to the application. Strangely, even though an error is flagged, the script continues to run and eventually reports completion through PubNub. At this point, the expected data object is returned, triggering the .end function in the JavaScript API, but resulting in an empty response. It's perplexing that the error occurs yet the R Script proceeds without interruption.
Error Message:
{ get: [Function],
deployr:
{ response:
{ success: false,
call: '/r/project/execute/script',
errorCode: 403,
error: '403: Project currently in-use by node_api, call rejected.\n' } } }