cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way in the Node.js Cloud SDK to use session cookies?

gregorw
SAP Mentor
SAP Mentor
39,292

Hello SAP Cloud SDK for Node.JS Experts,

a while ago I've posted the question Slow response times when calling SAP Business One (B1) Service Layer with CAP. In addition to the answer from mariatrinidad.martinezgea we've got the following answer from SAP Support:

"I just discussed this with someone from Business One to learn more about the problem.

From the discussion in SAP answers i also learned, that the authentication is done for every call to the B1 system. I also learned that the session keeps alive for 30mins, and after that the authentication is slower again, until the new session in B1 has been established.

So from CAP point of view a possible solution would be to keep the session alive with heartbeat requests every 25mins (or even longer intervals like 29mins if the interval scheduler is accurate enough). If you keep the session alive, with a heartbeat request then there will be no slow requests anymore as long as the session gets random requests and stays active.

We actually also do something similiar with our hana layer, there we use generic-pool and keep multiple connections in the pool and if one times out it is just reconnected, so it can be reused when needed.

This however you have to do in a custom implementation and is nothing, that we can offer generically."

Is there an option to solve that via the SAP Cloud SDK?

Best regards
Gregor

Accepted Solutions (1)

Accepted Solutions (1)

Junjie
Product and Topic Expert
Product and Topic Expert
0 Kudos

Since the issue is created in the OS repo, this question will be treated as "duplicated". Please find the updates by checking the issue.

Answers (0)