Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Receiving this error in prod application

google.auth.exceptions.TransportError: HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by SSLError(OSError(24, 'Too many open files')))"
}
 
we have developed an application that takes a very large image file 1+GB in size. Since, it is a Whole Slide Image (WSI) file we need to invoke a python based tiling process which breaks this 1+GB file into 1000s of smaller tiles/files. During the process we receive this exception. Any thoughts on how to manage/handle?
0 2 1,477
2 REPLIES 2

Hi @mohitkale,

Welcome to Google Cloud Community!

Would it be possible to provide logs regarding your error so that we could take an in-depth look into it?

Traceback (most recent call last): File "/air-server/background-tasks/bigquery_dataset_export.py", line 241, in update_score_by_user_pseudo_id client = self.get_client(client_data) File "/air-server/background-tasks/bigquery_dataset_export.py", line 67, in get_client credentials.refresh(requests.Request()) File "/usr/local/lib/python3.10/site-packages/google/oauth2/service_account.py", line 429, in refresh access_token, expiry, _ = _client.jwt_grant( File "/usr/local/lib/python3.10/site-packages/google/oauth2/_client.py", line 299, in jwt_grant response_data = _token_endpoint_request( File "/usr/local/lib/python3.10/site-packages/google/oauth2/_client.py", line 260, in _token_endpoint_request response_status_ok, response_data, retryable_error = _token_endpoint_request_no_throw( File "/usr/local/lib/python3.10/site-packages/google/oauth2/_client.py", line 209, in _token_endpoint_request_no_throw request_succeeded, response_data, retryable_error = _perform_request() File "/usr/local/lib/python3.10/site-packages/google/oauth2/_client.py", line 185, in _perform_request response = request( File "/usr/local/lib/python3.10/site-packages/google/auth/transport/requests.py", line 199, in __call__ six.raise_from(new_exc, caught_exc) File "<string>", line 3, in raise_from google.auth.exceptions.TransportError: HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))

Hi @robertcarlos 

I am getting this exception because I am using a script that connect with Oauth2 for Google BigQuery while doing this I am getting error.