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

Add a timeout to the api request in the plugin #193

Open
perllaghu opened this issue Feb 20, 2025 · 0 comments
Open

Add a timeout to the api request in the plugin #193

perllaghu opened this issue Feb 20, 2025 · 0 comments

Comments

@perllaghu
Copy link
Collaborator

perllaghu commented Feb 20, 2025

the code line is get_req = partial(requests.get, url, headers=headers, cookies=cookies) [there are actually 3 options] has no timeout for the python requests method..... so if the exchange doesn't respond, the code has to wait for the http timeout (30+ seconds, depending on client & server combinations)

Timeouts can be added - see https://requests.readthedocs.io/en/latest/user/advanced/#timeouts:

  • the connect timeout is the time for the remote server to response
  • the read timeout is the time to wait for an established connection to send data.

.... the two values can be different

[there's also a question as to whether these timeouts should be configurable, to allow for adjustment in different deployment environments]

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