Exist-db Multiple request(post,put) failed on restxq

53 views Asked by At

I am facing a problem on restxq multiple parallel request of post, put. When request from web application as async bulk request (approx. more then 5 ).

declare
%rest:path("/docs/{$doc-id}")
%rest:PUT("{$body}")
%rest:consumes("application/json")
%output:method("json")
function doc-rx:update-docs($doc-id as xs:string, $body) {
try{
   let $request:= parse-json(util:binary-to-string( $body))
   return
     <result>Success</result>
}catch * {
   <error>Caught error {$err:description}</error>
 }
};

Some request will failed with below message, some request got cancelled

Failed Message:

The underlying InputStream has been closed. Unable to encode string value: The underlying InputStream has been closed Some Request got cancelled.

Please advise how can I resolve this issue.

0

There are 0 answers