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

Too short timeout #67

Open
runborg opened this issue Jun 21, 2024 · 2 comments
Open

Too short timeout #67

runborg opened this issue Jun 21, 2024 · 2 comments

Comments

@runborg
Copy link
Collaborator

runborg commented Jun 21, 2024

This is at least in 1.0, not sure if its in 0.9

When code is waiting for response from zino after sending a command it looks like the timeout some times is to short.
if zino is busy it could take some seconds to get a reply.

The code failed after 10 sec while waiting.

Traceback (most recent call last):
  File "/home/runarb/src/zinolib-keepalive/zinolib-env/lib/python3.10/site-packages/zinolib/ritz.py", line 381, in _request
    data = self._sock.recv(recv_buffer)
TimeoutError: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/runarb/src/zinolib-keepalive/./examples/monitor.py", line 106, in <module>
    main()
  File "/home/runarb/src/zinolib-keepalive/./examples/monitor.py", line 58, in main
    cases[i] = sess.get_attributes(i)
  File "/home/runarb/src/zinolib-keepalive/zinolib-env/lib/python3.10/site-packages/zinolib/ritz.py", line 598, in get_attributes
    attrlist = self.get_raw_attributes(caseid)
  File "/home/runarb/src/zinolib-keepalive/zinolib-env/lib/python3.10/site-packages/zinolib/ritz.py", line 577, in get_raw_attributes
    response = self._request(cmd.encode("UTF-8"))
  File "/home/runarb/src/zinolib-keepalive/zinolib-env/lib/python3.10/site-packages/zinolib/ritz.py", line 383, in _request
    raise TimeoutError(
TimeoutError: Timed out waiting for data. command: b'getattrs 179411\r\n' buffer: ''
@runborg
Copy link
Collaborator Author

runborg commented Jun 21, 2024

i believe we have the same issue in 0.9 and 1.0 as i've seen Timeout errors in the client when large tings happens in the network. but cannot verify if this is the same issue or not.

@runborg
Copy link
Collaborator Author

runborg commented Jun 21, 2024

def __init__(self, server, port=8001, timeout=10, username=None, password=None):

This line sets the default timeout to 10sec, i think this timeout is to short because the old tcl server could potentially use over 10sec to deliver a result when it is under load

@hmpf hmpf changed the title To short timeout Too short timeout Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant