Thank you for visiting the Rackspace Community
The The Community is live! Post new content or topics so our teams can assist.

Please contact your support team if you have a question or need assistance for any Rackspace products, services, or articles.

How can I raise the timeout of a Cloud Load Balancer?

My application is currently running fine, but some of my administration pages timeout with a "Service Unavailable" message.  I have raised the PHP and Apache timeouts, but I am still getting the "Service Unavailable" message.

  • The default timeout for Cloud Load Balancers is 30 seconds.  As of November 8th 2012, you can modify this within the range of 30-120 seconds.

    Currently, the only way to modify this value is via the API.  Here are the steps to manually change the value:

    1. Authenticate: http://docs.rackspace.com/loadbalancers/api/v1.0/clb-getting-started/content/Generating_Auth_Token.html
    2. Check your current Cloud Load Balancer settings: http://docs.rackspace.com/loadbalancers/api/v1.0/clb-getting-started/content/List_LB_Details.html
    3. Update your Cloud Load Balancer settings: http://docs.rackspace.com/loadbalancers/api/v1.0/clb-getting-started/content/Configure_Load_Balancer.html
    4. Confirm that the settings have been updated by running the same command from step 2.  You will now see a timeout value in the results.

    As a note, the Managed Service Level supports making this modification.  Additional details can be found at the following link:

    http://www.rackspace.com/cloud/managed_cloud/support/

    Here are step-by-step CURL commands:

    1) Authenticate

    curl -i -d \
    '{
    "auth":
    {
    "RAX-KSKEY:apiKeyCredentials":
    {
    "username": "INSERT_YOUR_USERNAME",
    "apiKey": "INSERT_YOUR_API_KEY"}
    }
    }' \
    -H 'Content-Type: application/json' \
    'https://identity.api.rackspacecloud.com/v2.0/tokens'

    2) Check

    curl -i \
    -H 'X-Auth-Token: INSERT_AUTH_TOKEN' \
    -H 'Accept: application/json' \
    'https://ord.loadbalancers.api.rackspacecloud.com/v1.0/INSERT_ACCOUNT_ID/loadbalancers/INSERT_LOAD_BALANCER_ID'

    NOTE: make sure you are using the right data center.  example above is for ORD.

    3) Update

    curl -i -d \
    '{"loadBalancer":{
    "timeout": "120"
    }
    }' \
    -H 'X-Auth-Token: INSERT_AUTH_TOKEN' \
    -H 'Content-Type: application/json' \
    -X PUT \
    'https://ord.loadbalancers.api.rackspacecloud.com/v1.0/INSERT_ACCOUNT_ID/loadbalancers/INSERT_LOAD_BALANCER_ID'

    NOTE: again, make sure you are using the right data center.  example above is for ORD.

    4) Confirm

    {
        "loadBalancer": {
            "algorithm": "RANDOM", 
            "cluster": {
                "name": "ztm-n11.ord1.lbaas.rackspace.net"
            }, 
            "connectionLogging": {
                "enabled": false
            }, 
            "contentCaching": {
                "enabled": false
            }, 
            "created": {
                "time": "2012-12-23T22:50:41Z"
            }, 
            "id": 93823, 
            "name": "load-balancer-name", 
            "nodes": [
                {
                    "address": "10.177.2.50", 
                    "condition": "ENABLED", 
                    "id": 277393, 
                    "port": 80, 
                    "status": "ONLINE", 
                    "type": "PRIMARY"
                }
            ], 
            "port": 80, 
            "protocol": "HTTP", 
            "sourceAddresses": {
                "ipv4Public": "50.57.214.12", 
                "ipv4Servicenet": "10.183.253.50", 
                "ipv6Public": "2001:4801:7901::11/64", 
                "ipv6Servicenet": "NULL"
            }, 
            "status": "ACTIVE", 
            "timeout": 120, 
            "updated": {
                "time": "2012-12-23T22:57:53Z"
            }, 
            "virtualIps": [
                {
                    "address": "166.78.84.96", 
                    "id": 7715, 
                    "ipVersion": "IPV4", 
                    "type": "PUBLIC"
                }, 
                {
                    "address": "2001:4801:7901:0000:9ff4:a092:0000:0037", 
                    "id": 9065203, 
                    "ipVersion": "IPV6", 
                    "type": "PUBLIC"
                }
            ]
        }
    }

    ---- Cloud Load Balancer Changelog:

    http://docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/Document_Change_History-d1e126.html