Configuring timeouts for the connection to OpenSearch
Tweak the timeout settings for your connection to OpenSearch as command line switches in the OpenSearch indexes installation script.
Procedure
- 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\iq\opensearch\. - 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 os-client-max-connections-per-routeThe maximum number of connections for the route to the OpenSearch server 30 os-client-max-connectionsThe maximum number of open connections the underlying HTTP client is allowed to have 100 os-client-connection-request-timeoutThe time (in milliseconds) before a connection request is considered to have timed out 10000 os-client-connect-timeoutThe time (in milliseconds) before a connect action is considered to have timed out 10000 os-client-socket-timeoutThe time (in milliseconds) before the socket is considered to have timed out 30000 os-client-max-retry-timeoutThe time (in milliseconds) before a connection retry is considered to have timed out 30000 - 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 your IQ Combined 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. 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 switchos-client-socket-timeout, use the property nameos.client.socket.timeout. - Restart all the services you changed.