rvbapostredhatplumber

Problem sending POST request with big body size to Plumber API endpoint in R on Redhat 7.5


I am trying to send a table of about 140 rows and 5 columns as a JSON object (around 20 KB in size) from VBA using MSXML2.ServerXMLHTTP in a body of a POST request to an endpoint made available from R using plumber API package. The endpoint/function running in R on the server is throwing the following error: simpleError in fromJSON(requestList): argument "requestList" is missing, with no default

requestList is the parameter passed to the endpoint function. It looks like it gets lost in the web call. If I reduce the table size to 30 rows instead of 140 rows, requestList is found and the request is served successfully.

My platform is as follows: 1. Endpoints are written in R and exposed using Plumber API. 2. Endpoints are running on AWS instance with Redhat 7.5. 3. Timeout for the request is set to 100 minutes on VBA (client side).


Solution

  • If fromJSON(requestList) is:

    ... considering that JSON bodies have no size limits (and even if they had, for sure it wouldn't be 20 KB), I would say that the issue is in the data contained in the rows 31-140.

    There must be some special character which goes through fine at serialization on VBA client side (i.e. the data are correctly serialized because VBA tolerates that special character) but when deserializing on server side, this special character breaks the request as if the input wasn't actually an input.

    My suggestion to troubleshoot would be to chunk your request in blocks of 30 (1-30, 31-60, 61-90 etc.) until when you find the guilty chunk, and then going by bisection on that chunk until you detect the special character breaking it.