Documentation Center

Configuring timeouts for the Experience Optimization connection to OpenSearch

Tweak the timeout settings for your connection to OpenSearch, either as command line switches in the OpenSearch indexes installation script or, if you do not use that script, in the application.properties file(s) of your Experience Optimization microservices.

Procedure

  1. If you are creating OpenSearch indexes by using the separate indexes installation script, installOpenSearchIndexes (recommended in a production environment), then in your staging environment, open a PowerShell command shell (Windows) or a Unix command shell (Unix) and navigate to the installation media folder Content Delivery\roles\xo\opensearch\.
  2. Run the shell script, supplying command line switches as needed, and add one or more of the following command line switches, as needed:
    PropertyDescriptionDefault if not set
    os-client-max-connections-per-routeThe maximum number of connections for the route to the OpenSearch server30
    os-client-max-connectionsThe maximum number of open connections the underlying HTTP client is allowed to have100
    os-client-connection-request-timeoutThe time (in milliseconds) before a connection request is considered to have timed out10000
    os-client-connect-timeoutThe time (in milliseconds) before a connect action is considered to have timed out10000
    os-client-socket-timeoutThe time (in milliseconds) before the socket is considered to have timed out30000
    os-client-max-retry-timeoutThe time (in milliseconds) before a connection retry is considered to have timed out30000
  3. Alternatively, if you are creating OpenSearch indexes as part of running the microservice installation scripts (as sometimes done in a development environment), then in the configuration location of each of your Experience Optimization microservices, open application.properties for editing.
  4. Add lines of the format PROPERTY=VALUE, where PROPERTY is the property you want to set and VALUE is its desired value, in order to tweak the timeout behavior and number of connections. The names of the properties are the same as those of the command line switches, but with periods (.) instead of hyphens (-). So, for example, instead of the command line switch os-client-socket-timeout, use the property name os.client.socket.timeout.
  5. Restart all the services you changed.