Large number of errors 'connecting to pinecone'

We are getting a large number of the following errors returned from the Node SDK :

Error querying embeddings: PineconeConnectionError: Request failed to reach Pinecone. This can occur for reasons such as network problems that prevent the request from being completed, or a Pinecone API outage. Check your network connection…

It doesn’t happen every time, but it does happen often enough that we are now questioning whether Pinecone is the right solution. Anyone have some troubleshooting tips for this rather generic error?

@troy.morvant, Can you please share the code that causes this error? Are you using any integrations with Pinecone to conduct your queries?

I am using OpenAi to generate the embeddings for documents and the query embeddings that we send to pinecone.

The code is fairly basic:

async getMatchesFromEmbeddings(embeddings: number[], topK: number, namespace: string, indexName: string): Promise<ScoredPineconeRecord<PineconeMetadata>[]> {
    // Obtain a client for Pinecone
    const pinecone = new Pinecone({
      apiKey: this.config.getOrThrow('PINECONE_API_KEY'),

    // Get the Pinecone index
    const index = pinecone!.Index<PineconeMetadata>(indexName);

    // Get the namespace
    const pineconeNamespace = index.namespace(namespace);

    try {
      // Query the namespace with the openAi embeddings
      const queryResult = await pineconeNamespace.query({
        vector: embeddings,
        includeMetadata: true,

      return queryResult.matches || [];
    } catch (e) {
      // Log the error and throw it
      this.logger.log(`Error querying embeddings: ${e.message}`, { ...e });
      throw new Error(`Error querying embeddings: ${e}`);

Thanks for sharing these details, @troy.morvant. I’ve created a support ticket on your behalf with the information shared here.

To acknowledge receipt, reply to the email with the ticket content. Alternatively, you can view the ticket by signing in at the support portal with the same address you use to access the forums.