Changing load balancer timeout settings (Upgrading from Version 3.5 to Version 4.6)

To prevent connections from being closed before processes complete, you might need to adjust the timeout settings on your load balancer node.

Upgrade phase
You are not here. Setting up a client workstation
You are not here. Collecting required information
You are here icon. Preparing your cluster
You are not here. Upgrading the Cloud Pak for Data platform and services
Who needs to complete this task?
A cluster administrator must complete this task.
When do you need to complete this task?
You must complete this task if you plan to install or upgrade specific services.

Even if you don't plan to install the specified services, you should complete this task if you work with large data sets or have slow network speed to prevent connections from timing out.

About this task

If you plan to install the following services, you must adjust the load balancer timeout settings to prevent connections from being closed before processes complete:
  • Db2®
  • Db2 Data Gate
  • Db2 Warehouse
  • OpenPages®
  • Watson™ Discovery
  • Watson Knowledge Catalog
  • Watson Query
  • Watson Speech services
  • Watson Studio

You also might need to adjust the timeout settings if you are working with large data sets or you have slower network speeds. For example, you might need to increase the timeout value if you receive a timeout or failure when you upload a large file.

Procedure

Complete the appropriate task for your environment:


Self-managed on-premises deployments

The following procedure shows how to change the timeout settings if you are using HAProxy. If you are using a load balancer other than HAProxy, see the documentation for your load balancer for information about how to configure the timeout settings.

If you are using HAProxy, the load balancer node is the OpenShift cluster public node.

  1. On the load balancer node, check the HAProxy timeout settings in the /etc/haproxy/haproxy.cfg file. The minimum value for most services is 300s, as follows:
    timeout client          300s 
    timeout server          300s 
    Note:
    • The minimum value for Db2 Data Gate is 7500s, as follows:
      timeout client          7500s 
      timeout server          7500s 
    • The minimum value for Watson Speech services is 1800s, as follows:
      timeout client          1800s 
      timeout server          1800s 
  2. If necessary, run the following command to change the timeout values to the highest values that are required based on the services that you plan to install and use:
    • To change the timeout client setting, enter the following command:
      sed -i -e "/timeout client/s/ [0-9].*/ 5m/" /etc/haproxy/haproxy.cfg
    • To change the timeout server setting, enter the following command:
      sed -i -e "/timeout server/s/ [0-9].*/ 5m/" /etc/haproxy/haproxy.cfg
  3. Run the following command to apply the changes that you made to the HAProxy configuration:
    systemctl restart haproxy


IBM Cloud deployments

The following procedures show how to change the timeout settings if you are using HAProxy. If you are using a load balancer other than HAProxy, see the documentation for your load balancer for information about how to configure the timeout settings.

If you are using HAProxy, the load balancer node is the OpenShift cluster public node.

If you are setting HAProxy timeout settings for Cloud Pak for Data on IBM® Cloud, you can configure route timeouts by using the oc annotate command.

  1. Use the following command to set the server-side timeout for the HAProxy route to 360 seconds:
    oc annotate route zen-cpd --overwrite haproxy.router.openshift.io/timeout=360s

    If you don't provide the units, ms is the default.

  2. Customize other route-specific settings. For more information, Route-specific annotations in the Red Hat OpenShift Container Platform documentation:
Note: On a Virtual Private Cloud (VPC) Gen2 cluster, the load balancer timeout is set to the following values:
  • Server-side connection attempt: 5 seconds
  • Client-side idle connection: 50 seconds
  • Server-side idle connection: 50 seconds
You cannot change these values. For more information, see Connection timeouts.


Red Hat OpenShift Service on AWS (ROSA) deployments

The following procedures show how to change the timeout settings if you are using Cloud Pak for Data on ROSA.

  1. Obtain the VPC ID for your ROSA cluster from the AWS console.
  2. Export the VPC as VPC_ID, as shown in the following example:
    export VPC_ID=vpc-0047646ab74dd2f61
  3. Run the following script:
    LOAD_BALANCER=`aws elb describe-load-balancers --output text | grep $VPC_ID | awk '{ print $5 }' | cut -d- -f1 | xargs`
    for lbs in ${LOAD_BALANCER[@]}; do
    aws elb modify-load-balancer-attributes --load-balancer-name $lbs --load-balancer-attributes "{\"ConnectionSettings\":{\"IdleTimeout\":600}}"
    done
  4. To validate the changes, run the following script:
    LOAD_BALANCER=`aws elb describe-load-balancers --output text | grep $VPC_ID | awk '{ print $5 }' | cut -d- -f1 | xargs`
    for lbs in ${LOAD_BALANCER[@]}; do
    aws elb describe-load-balancer-attributes  --load-balancer-name $lbs
    done

    The IdleTimeout value in the connection settings is shown as 600.