Skip to main content
Version: next

Configure timeouts

Since version 3.18

This guide explains how to configure timeout values for Algolia client requests

Overview

The Algolia extension allows you to configure timeout values for different types of operations performed by the Algolia client. These timeouts control how long the client will wait before considering a request as failed.

Available timeout settings

The extension supports two types of timeouts:

  • Connection timeout (FRONT_COMMERCE_ALGOLIA_TIMEOUT_CONNECT): Time to wait when establishing a connection to Algolia's servers (default: 2000 milliseconds)
  • Read timeout (FRONT_COMMERCE_ALGOLIA_TIMEOUT_READ): Time to wait when reading data from Algolia's servers (default: 5000 milliseconds)

Configuration

To configure timeouts, you need to set the corresponding environment variables in your .env file:

.env
FRONT_COMMERCE_ALGOLIA_TIMEOUT_CONNECT=1500
FRONT_COMMERCE_ALGOLIA_TIMEOUT_READ=4000

All timeout values are specified in milliseconds.