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

ReadTimeout: HTTPConnectionPool(host='localhost', port=36469): Read timed out. (read timeout=60.0) #222

Closed
G-TTYg opened this issue Jan 14, 2024 · 2 comments
Labels
type:bug Something isn't working

Comments

@G-TTYg
Copy link

G-TTYg commented Jan 14, 2024

Description of the bug:

When I tried to use python code to call the gemin model on colab to generate a long article, it timed out. I couldn't find an option to extend the timeout.Is there any solution?

Actual vs expected behavior:

response = model.generate_content(prompt_parts, stream=True)


TimeoutError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
536 try:
--> 537 response = conn.getresponse()
538 except (BaseSSLError, OSError) as e:

25 frames
TimeoutError: timed out

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

ReadTimeoutError Traceback (most recent call last)
ReadTimeoutError: HTTPConnectionPool(host='localhost', port=36469): Read timed out. (read timeout=60.0)

During handling of the above exception, another exception occurred:

ReadTimeout Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
530 raise SSLError(e, request=request)
531 elif isinstance(e, ReadTimeoutError):
--> 532 raise ReadTimeout(e, request=request)
533 elif isinstance(e, _InvalidHeader):
534 raise InvalidHeader(e, request=request)

ReadTimeout: HTTPConnectionPool(host='localhost', port=36469): Read timed out. (read timeout=60.0)

Any other information you'd like to share?

No response

@G-TTYg G-TTYg added the type:bug Something isn't working label Jan 14, 2024
@G-TTYg
Copy link
Author

G-TTYg commented Jan 14, 2024

I solved the problem directly using the requests library.

@G-TTYg G-TTYg closed this as completed Jan 14, 2024
@vishalnarnaware
Copy link

Hi @G-TTYg, Could you please share exactly what you did? I am facing the same issue.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants