02-23-2024 6:21 PM - edited 02-23-2024 6:25 PM
We have a SAP CAP service, which connects to SAP SuccessFactors to post/upsert data to SF.
The error is "statusCode":502,"reason":{"message":"Error during request to remote service: \ntimeout of 10000ms exceeded","name":"AxiosError","config":{"timeout":10000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"proxy":false,"method":"post"
The error occurs in situations where we post a larger chunk of data to SAP SF, and the response from SAP SF takes more than 10000ms. It seems the SAP CAP service doesn't wait beyond 10000ms for a response back from SAP SF, and then just throws the above error. It works fine if SAP SF comes back with a response within this time. If we try through postman, this works fine with a large chunk of data.
We are using a SAP BTP destination for connectivity to SAP SF and have maintained the config in the packgage.json as
...
"cds": {
"requires": {
"sf_tech": {
"kind": "odata",
"model": "srv/external/sf-tech",
"credentials": {
"destination": "SFTech",
"requestTimeout": 80000 // also tried 30000
}
}
}
}
...
The SAP CAP service code that triggers the post/upsert to SAP SF is
import { Request, Service } from "@sap/cds";
...
const headers = {
MaxDataServiceVersion: this.dataServiceVersion,
"Content-Type": `multipart/mixed; boundary=${batchId}`,
};
let response = await (this.service as Service)
.transaction(this.request)
.send("POST", "/$batch", this.batchBody as String, headers);
...
The app is deployed to sap cloud foundry and the btp destination from above is also configured and maintained.
Does anyone know where to increase/set the timeout beyond 10000ms ?
Regards,
Mel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.