Configuring timeouts for the Experience Optimization connection to Elasticsearch

Tweak the timeout settings for your connection to Elasticsearch, either as command line switches in the Elasticsearch 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 Elasticsearch indexes by using the separate indexes installation script, installElasticsearchIndexes (recommended in a production environment), then open a PowerShell command shell (Windows) or a Unix command shell (Unix) and navigate to the installation media folder Content Delivery\resources\elasticsearch\.
  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
    es-client-max-connections-per-routeThe maximum number of connections for the route to the Elasticsearch server30
    es-client-max-connectionsThe maximum number of open connections the underlying HTTP client is allowed to have100
    es-client-connection-request-timeoutThe time (in milliseconds) before a connection request is considered to have timed out10000
    es-client-connect-timeoutThe time (in milliseconds) before a connect action is considered to have timed out10000
    es-client-socket-timeoutThe time (in milliseconds) before the socket is considered to have timed out30000
    es-client-max-retry-timeoutThe time (in milliseconds) before a connection retry is considered to have timed out30000
  3. Alternatively, if you are creating Elasticsearch 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. You can set any or all of the following properties:
    PropertyDescriptionDefault if not set
    es.client.max.connections.per.routeThe maximum number of connections for the route to the Elasticsearch server.30
    es.client.max.connectionsThe maximum number of open connections the underlying HTTP client is allowed to have100
    es.client.connection.request.timeoutThe time (in milliseconds) before a connection request is considered to have timed out10000
    es.client.connect.timeoutThe time (in milliseconds) before a connect action is considered to have timed out10000
    es.client.socket.timeoutThe time (in milliseconds) before the socket is considered to have timed out30000
    es.client.max.retry.timeoutThe time (in milliseconds) before a connection retry is considered to have timed out30000
  5. Restart all the services you changed.