-
Notifications
You must be signed in to change notification settings - Fork 532
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
feat: 🎸 add --single-threaded flag to fetch azure #2561
Merged
iojw
merged 2 commits into
skypilot-org:master
from
sunny0826:feat/fetch-azure-single-threaded
Sep 19, 2023
Merged
feat: 🎸 add --single-threaded flag to fetch azure #2561
iojw
merged 2 commits into
skypilot-org:master
from
sunny0826:feat/fetch-azure-single-threaded
Sep 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@sunny0826 What exactly is the error that occurs with SSL? Can you share more details? |
Requesting too much data from ...
Done fetching pricing germanywestcentral
Getting pricing for norwayeast
Done fetching pricing italynorth
Done fetching pricing norwayeast
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/connectionpool.py", line 711, in urlopen
self._prepare_proxy(conn)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1007, in _prepare_proxy
conn.connect()
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/ssl.py", line 1073, in _create
self.do_handshake()
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:1131)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='prices.azure.com', port=443): Max retries exceeded with url: /api/retail/prices?$filter=serviceName%20eq%20%27Virtual%20Machines%27%20and%20priceType%20eq%20%27Consumption%27%20and%20armRegionName%20eq%20%27brazilsouth%27&$skip=1000 (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/Users/guoxudong_1/ai/skypilot/sky/clouds/service_catalog/data_fetchers/fetch_azure.py", line 85, in get_pricing_df
r = requests.get(url)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='prices.azure.com', port=443): Max retries exceeded with url: /api/retail/prices?$filter=serviceName%20eq%20%27Virtual%20Machines%27%20and%20priceType%20eq%20%27Consumption%27%20and%20armRegionName%20eq%20%27brazilsouth%27&$skip=1000 (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)')))
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/guoxudong_1/ai/skypilot/sky/clouds/service_catalog/data_fetchers/fetch_azure.py", line 155, in get_all_regions_instance_types_df
dfs = dfs.get()
File "/Users/guoxudong_1/anaconda3/envs/sky-dev/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
requests.exceptions.SSLError: None: Max retries exceeded with url: /api/retail/prices?$filter=serviceName%20eq%20%27Virtual%20Machines%27%20and%20priceType%20eq%20%27Consumption%27%20and%20armRegionName%20eq%20%27brazilsouth%27&$skip=1000 (Caused by None) |
iojw
approved these changes
Sep 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sunny0826! LGTM, just some minor copy fixes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add same flag
--single-threaded
for the Azure fetching script.--single-threaded
: Run in single-threaded mode. This is useful when multiple processes don't work well with the azure client due to ssl issues.