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

Execution timeout not respected within RPC server #13

Open
3 tasks
VigneshVSV opened this issue Jul 22, 2024 · 0 comments
Open
3 tasks

Execution timeout not respected within RPC server #13

VigneshVSV opened this issue Jul 22, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@VigneshVSV
Copy link
Owner

VigneshVSV commented Jul 22, 2024

There are two timeouts within the RPC server, the invokation timeout and the execution timeout

The invokation timeout gaurantees the non-execution of a property read/write or an action invokation if the timeout expired. It raises a timeout error to the client.

The execution timeout should kick in after the invocation has started and should return without a response and a timeout error if the requested task was not carried out within the asked time.

The separation of these two timeouts is mainly an artifact of ZMQ, wherein, once a message has been placed on a socket, it cannot be revoked without sending an additional message. The server will not know if the client is waiting on the other side for a reply or the client went ahead to do other things since the response was too slow.

To have 100% response to the client, at least with a timeout, the server is threaded out into message listener part and the executor part.
The message listener part must report both invokation and execution timeouts.

Currently only the invokation timeout is reported to the client. If the user writes a suboptimal method which takes a very long time to complete, the server is stuck.

Possible steps

  • return timeout error message to the client after execution timeout and dont lead to infinite block
  • instruct event loop to drop the reply in such cases
  • Finally, add validation to the values of invocation and execution timeouts. For example, both can never be arbitrarily long or infinite
@VigneshVSV VigneshVSV added bug Something isn't working help wanted Extra attention is needed labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant