"Connection reset by peer" during indexation of vectors

Hi,

I ran into this error (multiple times) when doing the indexation of vectors, it occurs randomly on some vectors and when I retry indexing them the error disappears. Does anyone have an explanation please ?

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 281, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.9/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/techdealpartners/ai/embeddings/modules/insert.py", line 94, in insert_chunk_data
    self.pinecone_index.upsert(vectors)
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/utils/error_handling.py", line 17, in inner_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/pinecone/index.py", line 59, in upsert
    return self._vector_api.upsert(
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/api_client.py", line 776, in __call__
    return self.callable(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/api/vector_operations_api.py", line 593, in __upsert
    return self.call_with_http_info(**kwargs)
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info
    return self.api_client.call_api(
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/api_client.py", line 413, in call_api
    return self.__call_api(resource_path, method,
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/api_client.py", line 200, in __call_api
    response_data = self.request(
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/api_client.py", line 459, in request
    return self.rest_client.POST(url,
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/rest.py", line 271, in POST
    return self.request("POST", url,
  File "/usr/local/lib/python3.9/dist-packages/pinecone/core/client/rest.py", line 157, in request
    r = self.pool_manager.request(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/request.py", line 78, in request
    return self.request_encode_body(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/request.py", line 170, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.9/dist-packages/urllib3/poolmanager.py", line 375, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.9/dist-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 281, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.9/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Thank you !

1 Like

Hey @Chaymae, I think this is just an error with the client having trouble establishing a conneciton that may happen intermittently depending on your network. It’s not related to any vectors.
I would suggest trying to use the gRPC client to see if that improves things for you. Let me know how it goes!

Hi, I am having the same issue.
I used the code in https://www.pinecone.io/docs/examples/semantic-text-search/ and it did work initially but after deleting and recreating the index it ceased to work permanently and I keep getting this error.
I also tried installing the grpc library but it didn’t resolve this and it looks like the call is made using the rest client anyway.

Traceback (most recent call last):
  File "/Users/anonymous/Code/pinecone-poc/test_pinecone2.py", line 65, in <module>
    index.upsert(vectors=zip(batch_df.vector_id, batch_df.title_vector), namespace='title')
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/utils/error_handling.py", line 17, in inner_func
    return func(*args, **kwargs)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/index.py", line 70, in upsert
    return self._vector_api.upsert(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 776, in __call__
    return self.callable(self, *args, **kwargs)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api/vector_operations_api.py", line 835, in __upsert
    return self.call_with_http_info(**kwargs)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info
    return self.api_client.call_api(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 413, in call_api
    return self.__call_api(resource_path, method,
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api
    response_data = self.request(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 459, in request
    return self.rest_client.POST(url,
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 271, in POST
    return self.request("POST", url,
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 157, in request
    r = self.pool_manager.request(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/request.py", line 78, in request
    return self.request_encode_body(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/request.py", line 170, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/Users/anonymous/Code/pinecone-poc/.venv/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/anonymous/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/Users/anonymous/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/Users/anonymous/.pyenv/versions/3.8.7/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

stack shows call to rest client in line:

File "/Users/anonymous/Code/pinecone-poc/.venv/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 459, in request

Hi Itaim,
Looking through the example code, it looks like the batch size for upserting is set to 300 which could be the cause. Try lowering the batch size to say 100 and see if that intermittent error goes away. Also, just to be sure, also update your client if you haven’t already by using ‘pip install -U “pinecone-client[grpc]”’

Hi Kbutler,

I tried lowering the batch size to 100 and then 10, also installed pinecone-client[grpc], current version is 2.0.11.
But was not successful.

Please review the following suggestions for performance related issues and let us know if it helps.

Basic performance checklist

  • Switch to a cloud environment. For example: EC2, GCE, Google Colab, GCP AI Platform Notebook, or SageMaker Notebook. If you experience slow uploads or high query latencies, it might be because you are accessing Pinecone from your home network.
  • Deploy your application and your Pinecone service in the same region. For users on the Free plan, Pinecone runs in GCP US-West (Oregon). Contact us if you need a dedicated deployment.
  • Reuse connections. We recommend you reuse the same pinecone.Index() instance when you are upserting and querying the same index.
  • Operate within known limits.

Thanks! Works on SageMaker

FYI. We have released a new pinecone-client and ‘pinecone-client[grpc]’. It includes better connection timeout handling. Please upgrade.

I have the same problem, anybody sovled that ?

I’m on ruby, so I can’t use the pinecone client, and I’m having trouble upserting vectors.

It was working a few days ago, but it suddenly started having SSL errors. I’ll write back if I find a solution.

Hi, I am trying to connect to pinecone using Sagemaker. However, I am getting 104, ‘Connection reset by peer’ error. Below is what I am doing. Can you please help?

!pip install -U pinecone-client[grpc]
import os
from pinecone import Pinecone, ServerlessSpec
# Now do stuff
print(pc.list_indexes().names())

WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectionResetError(104, 'Connection reset by peer')': /indexes
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectionResetError(104, 'Connection reset by peer')': /indexes
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectionResetError(104, 'Connection reset by peer')': /indexes
---------------------------------------------------------------------------
ProtocolError                             Traceback (most recent call last)
ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

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

MaxRetryError                             Traceback (most recent call last)
Cell In[26], line 9
      4 pc = Pinecone(
      5     api_key=api_key
      6 )
      8 # Now do stuff
----> 9 print(pc.list_indexes().names())

File /opt/conda/lib/python3.10/site-packages/pinecone/control/pinecone.py:397, in Pinecone.list_indexes(self)
    353 def list_indexes(self) -> IndexList:
    354     """Lists all indexes.
    355     
    356     The results include a description of all indexes in your project, including the 
   (...)
    395 
    396     """
--> 397     response = self.index_api.list_indexes()
    398     return IndexList(response)

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/api_client.py:772, in Endpoint.__call__(self, *args, **kwargs)
    761 def __call__(self, *args, **kwargs):
    762     """ This method is invoked when endpoints are called
    763     Example:
    764 
   (...)
    770 
    771     """
--> 772     return self.callable(self, *args, **kwargs)

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/api/manage_indexes_api.py:1100, in ManageIndexesApi.__init__.<locals>.__list_indexes(self, **kwargs)
   1096 kwargs['_check_return_type'] = kwargs.get(
   1097     '_check_return_type', True
   1098 )
   1099 kwargs['_host_index'] = kwargs.get('_host_index')
-> 1100 return self.call_with_http_info(**kwargs)

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/api_client.py:834, in Endpoint.call_with_http_info(self, **kwargs)
    830     header_list = self.api_client.select_header_content_type(
    831         content_type_headers_list)
    832     params['header']['Content-Type'] = header_list
--> 834 return self.api_client.call_api(
    835     self.settings['endpoint_path'], self.settings['http_method'],
    836     params['path'],
    837     params['query'],
    838     params['header'],
    839     body=params['body'],
    840     post_params=params['form'],
    841     files=params['file'],
    842     response_type=self.settings['response_type'],
    843     auth_settings=self.settings['auth'],
    844     async_req=kwargs['async_req'],
    845     _check_type=kwargs['_check_return_type'],
    846     _return_http_data_only=kwargs['_return_http_data_only'],
    847     _preload_content=kwargs['_preload_content'],
    848     _request_timeout=kwargs['_request_timeout'],
    849     _host=_host,
    850     collection_formats=params['collection_format'])

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/api_client.py:409, in ApiClient.call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, async_req, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, _check_type)
    355 """Makes the HTTP request (synchronous) and returns deserialized data.
    356 
    357 To make an async_req request, set the async_req parameter.
   (...)
    406     then the method will return the response directly.
    407 """
    408 if not async_req:
--> 409     return self.__call_api(resource_path, method,
    410                            path_params, query_params, header_params,
    411                            body, post_params, files,
    412                            response_type, auth_settings,
    413                            _return_http_data_only, collection_formats,
    414                            _preload_content, _request_timeout, _host,
    415                            _check_type)
    417 return self.pool.apply_async(self.__call_api, (resource_path,
    418                                                method, path_params,
    419                                                query_params,
   (...)
    427                                                _request_timeout,
    428                                                _host, _check_type))

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/api_client.py:196, in ApiClient.__call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, _check_type)
    192     url = _host + resource_path
    194 try:
    195     # perform request and return response
--> 196     response_data = self.request(
    197         method, url, query_params=query_params, headers=header_params,
    198         post_params=post_params, body=body,
    199         _preload_content=_preload_content,
    200         _request_timeout=_request_timeout)
    201 except PineconeApiException as e:
    202     e.body = e.body.decode('utf-8')

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/api_client.py:435, in ApiClient.request(self, method, url, query_params, headers, post_params, body, _preload_content, _request_timeout)
    433 """Makes the HTTP request using RESTClient."""
    434 if method == "GET":
--> 435     return self.rest_client.GET(url,
    436                                 query_params=query_params,
    437                                 _preload_content=_preload_content,
    438                                 _request_timeout=_request_timeout,
    439                                 headers=headers)
    440 elif method == "HEAD":
    441     return self.rest_client.HEAD(url,
    442                                  query_params=query_params,
    443                                  _preload_content=_preload_content,
    444                                  _request_timeout=_request_timeout,
    445                                  headers=headers)

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/rest.py:267, in RESTClientObject.GET(self, url, headers, query_params, _preload_content, _request_timeout)
    265 def GET(self, url, headers=None, query_params=None, _preload_content=True,
    266         _request_timeout=None):
--> 267     return self.request("GET", url,
    268                         headers=headers,
    269                         _preload_content=_preload_content,
    270                         _request_timeout=_request_timeout,
    271                         query_params=query_params)

File /opt/conda/lib/python3.10/site-packages/pinecone/core/client/rest.py:224, in RESTClientObject.request(self, method, url, query_params, headers, body, post_params, _preload_content, _request_timeout)
    221             raise PineconeApiException(status=0, reason=msg)
    222     # For `GET`, `HEAD`
    223     else:
--> 224         r = self.pool_manager.request(method, url,
    225                                       fields=query_params,
    226                                       preload_content=_preload_content,
    227                                       timeout=timeout,
    228                                       headers=headers)
    229 except urllib3.exceptions.SSLError as e:
    230     msg = "{0}\n{1}".format(type(e).__name__, str(e))

File /opt/conda/lib/python3.10/site-packages/urllib3/_request_methods.py:110, in RequestMethods.request(self, method, url, body, fields, headers, json, **urlopen_kw)
    107     urlopen_kw["body"] = body
    109 if method in self._encode_url_methods:
--> 110     return self.request_encode_url(
    111         method,
    112         url,
    113         fields=fields,  # type: ignore[arg-type]
    114         headers=headers,
    115         **urlopen_kw,
    116     )
    117 else:
    118     return self.request_encode_body(
    119         method, url, fields=fields, headers=headers, **urlopen_kw
    120     )

File /opt/conda/lib/python3.10/site-packages/urllib3/_request_methods.py:143, in RequestMethods.request_encode_url(self, method, url, fields, headers, **urlopen_kw)
    140 if fields:
    141     url += "?" + urlencode(fields)
--> 143 return self.urlopen(method, url, **extra_kw)

File /opt/conda/lib/python3.10/site-packages/urllib3/poolmanager.py:443, in PoolManager.urlopen(self, method, url, redirect, **kw)
    441     response = conn.urlopen(method, url, **kw)
    442 else:
--> 443     response = conn.urlopen(method, u.request_uri, **kw)
    445 redirect_location = redirect and response.get_redirect_location()
    446 if not redirect_location:

File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:875, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
    870 if not conn:
    871     # Try again
    872     log.warning(
    873         "Retrying (%r) after connection broken by '%r': %s", retries, err, url
    874     )
--> 875     return self.urlopen(
    876         method,
    877         url,
    878         body,
    879         headers,
    880         retries,
    881         redirect,
    882         assert_same_host,
    883         timeout=timeout,
    884         pool_timeout=pool_timeout,
    885         release_conn=release_conn,
    886         chunked=chunked,
    887         body_pos=body_pos,
    888         preload_content=preload_content,
    889         decode_content=decode_content,
    890         **response_kw,
    891     )
    893 # Handle redirect?
    894 redirect_location = redirect and response.get_redirect_location()

File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:875, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
    870 if not conn:
    871     # Try again
    872     log.warning(
    873         "Retrying (%r) after connection broken by '%r': %s", retries, err, url
    874     )
--> 875     return self.urlopen(
    876         method,
    877         url,
    878         body,
    879         headers,
    880         retries,
    881         redirect,
    882         assert_same_host,
    883         timeout=timeout,
    884         pool_timeout=pool_timeout,
    885         release_conn=release_conn,
    886         chunked=chunked,
    887         body_pos=body_pos,
    888         preload_content=preload_content,
    889         decode_content=decode_content,
    890         **response_kw,
    891     )
    893 # Handle redirect?
    894 redirect_location = redirect and response.get_redirect_location()

File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:875, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
    870 if not conn:
    871     # Try again
    872     log.warning(
    873         "Retrying (%r) after connection broken by '%r': %s", retries, err, url
    874     )
--> 875     return self.urlopen(
    876         method,
    877         url,
    878         body,
    879         headers,
    880         retries,
    881         redirect,
    882         assert_same_host,
    883         timeout=timeout,
    884         pool_timeout=pool_timeout,
    885         release_conn=release_conn,
    886         chunked=chunked,
    887         body_pos=body_pos,
    888         preload_content=preload_content,
    889         decode_content=decode_content,
    890         **response_kw,
    891     )
    893 # Handle redirect?
    894 redirect_location = redirect and response.get_redirect_location()

File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:845, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
    842 elif isinstance(new_e, (OSError, HTTPException)):
    843     new_e = ProtocolError("Connection aborted.", new_e)
--> 845 retries = retries.increment(
    846     method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    847 )
    848 retries.sleep()
    850 # Keep track of the error for the retry warning.

File /opt/conda/lib/python3.10/site-packages/urllib3/util/retry.py:515, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)
    513 if new_retry.is_exhausted():
    514     reason = error or ResponseError(cause)
--> 515     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    517 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
    519 return new_retry

MaxRetryError: HTTPSConnectionPool(host='api.pinecone.io', port=443): Max retries exceeded with url: /indexes (Caused by ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')))
pc = Pinecone(
    api_key=api_key
)

# Now do stuff
print(pc.list_indexes().names())

There can be many different reasons for a connection to be reset.

  • Does this code work successfully outside of Sagemaker?
  • What version of pinecone-client are you using?