Retry Mechanism

The upstash-vector SDK incorporates a reliable retry mechanism to manage network or API issues. In the event of a failed request, the SDK automatically attempts up to three retries, with each attempt spaced one second apart.

For customization of the retry behavior, you have the flexibility to set the retries and retry_interval (in seconds) parameters according to your specific requirements. For instance:

from upstash_vector import Index

# Try 5 times with a 2-second interval between retries
index = Index.from_env(retries=5, retry_interval=2.0)