Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can we set a timeout for a Direct Client Call #218

Closed
JosephJeffs opened this issue Jun 7, 2021 · 6 comments
Closed

Question: Can we set a timeout for a Direct Client Call #218

JosephJeffs opened this issue Jun 7, 2021 · 6 comments

Comments

@JosephJeffs
Copy link

**Is your feature request related to a problem? Yes, I am making a function call to an SAP system that is taking a long time to respond. Once I have 4 requests outstanding, I can not open another client until SAP responds.

Describe the solution you'd like
Is it possible, to abort an outstanding request or set a timeout value for how long to wait for a response.

Describe alternatives you've considered
I have tried using the Client.close() function, but it does not free the connection

Additional context
I am running the application in express.

Thank you for your help.

@bsrdjan
Copy link
Member

bsrdjan commented Jun 8, 2021

The maximum runtime and inactivity timeouts of RFC connections are configured by basis profile parameters in a backend system (transactions RZ10, RZ11...). Would that be of any help ?

Similar request: #105

@JosephJeffs
Copy link
Author

Thank you for the quick reply. its unlikely that this could be a solution as it would impact other processes that may need a longer run time than what would be acceptable for my application.

@bsrdjan
Copy link
Member

bsrdjan commented Jun 14, 2021

The cancel() method is now exposed at add-on, client and pool level and can be used to terminate ongoing RFC calls.

Can you test it by checkout the feature/connection-cancel branch and build the add-on from source?

Documentation and example: feature/connection-cancel/doc/usage.md#cancel-connection

The timeout is not implemented but can be added the standard way at application level.

@bsrdjan
Copy link
Member

bsrdjan commented Jun 16, 2021

The timeout and cancel event are added:

Feedback and suggestions welcome before released.

@JosephJeffs
Copy link
Author

JosephJeffs commented Jun 18, 2021

The documentation and examples look great. The functionality is just what I would want. I am not sure how quickly I will be able to try it out. Since I am running on Kubernetes, I also have the option to turn off the readiness probe and eventually kill it if the requests do not come back. In that design I would just need to keep track of how many connections I have open at a time and create a new route to respond when I am running out. Thank you again for your help.

@bsrdjan
Copy link
Member

bsrdjan commented Jun 23, 2021

Released in 2.5.0

@bsrdjan bsrdjan closed this as completed Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants