-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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: What's timeout? #3066
Comments
Sorry, maybe it is because my English is not good enough, but I'm still not sure about that. |
Try to read the chapter from the link above and ask a concrete question. |
For example, I use one clientsession to make several requests. And because the programme will run for hours, I won't close the session. I want to set the timeout for each request, so that if I don't get the response in 3s, I will try this again. So how can I make it? |
|
Although I have differents requests, but I want to set the same timeout for each request. So can I write like aiohttp.ClientSession(timeout=3)? |
Yes, you can. I think we can close the issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
" class aiohttp.ClientSession(*, connector=None, loop=None, cookies=None, headers=None, skip_auto_headers=None, auth=None, json_serialize=json.dumps, version=aiohttp.HttpVersion11, cookie_jar=None, read_timeout=None, conn_timeout=None, timeout=sentinel, raise_for_status=False, connector_owner=True, auto_decompress=True, proxies=None)
timeout – a ClientTimeout settings structure, 5min
total timeout by default. "
This is from https://docs.aiohttp.org/en/stable/client_reference.html. But I don't understand if it means that the timeout for each get/post request or the timeout for the connection pool. And if it is for the connection pool, how can I set the timeout for each request? Like, http://docs.python-requests.org/en/master/user/quickstart/#timeouts.
The text was updated successfully, but these errors were encountered: