pinecone.core.exceptions.PineconeProtocolError via Streamlit cloud

Hi everyone,

I built a webapp on streamlit cloud which queries my pinecone vector db. Most of the time it works perfectly, but every so often i get an pinecone.core.exceptions.PineconeProtocolError when the vector.query line is called - please see screenshot


This doesnt happen on local host so it’s probably related to web host / streamlit or something I am not catching properly?

Any ideas? thanks in advance for your help and guidance.

It seems like a connection issue on the streamlit side. If this error was occurring every time you run on Streamlit Cloud I would have suggested checking your environment variables (Streamlit Cloud lets you set these via “secrets”) — but as it’s a randomly occurring issue it would seem to be a connection issue between Pinecone + Streamlit. You could also try making sure your Streamlit app and Pinecone index are hosted in similar geographies.