Configuring timeouts for the IQ 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 IQ microservice(s).
Procedure
- 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\.
- Run the shell script, supplying command line switches as needed, and add one or more of the following command line switches, as needed:
Property Description Default 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 have 100 es-client-connection-request-timeoutThe time (in milliseconds) before a connection request is considered to have timed out 10000 es-client-connect-timeoutThe time (in milliseconds) before a connect action is considered to have timed out 10000 es-client-socket-timeoutThe time (in milliseconds) before the socket is considered to have timed out 30000 es-client-max-retry-timeoutThe time (in milliseconds) before a connection retry is considered to have timed out 30000 - 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 your IQ Combined Index and Query Services microservice, or alternatively, in each of the configuration locations of your IQ Index Service and your IQ Query Service, open application.properties for editing.
- 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:Property Description Default 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 have 100 es.client.connection.request.timeoutThe time (in milliseconds) before a connection request is considered to have timed out 10000 es.client.connect.timeoutThe time (in milliseconds) before a connect action is considered to have timed out 10000 es.client.socket.timeoutThe time (in milliseconds) before the socket is considered to have timed out 30000 es.client.max.retry.timeoutThe time (in milliseconds) before a connection retry is considered to have timed out 30000 - Restart all the services you changed.