429 Too Many Requests

You're viewing Apigee Edge documentation.
Go to the Apigee X documentation.
info

Symptom

You may see this error coming from the router and not seeing the 429 from a trace as the requests are not making it to the Message Processors. Calls directly to the routers themselves, also return 429.

Error Messages

<html>
  <head> <title>429 Too Many Requests</title> </head>
  <body> <center> <h1>429 Too Many Requests</h1> </center> <hr> <center>server</center> </body>
</html>
    

Possible Causes

Typically the nginx config file has a setting of conf_load_balancing_load.balancing.driver.nginx.limit_conn=5000 which may be too low for incoming connections.

Diagnosis

  1. Check your default limit on the nginx router with the following command:
    /opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_load_balancing_load.balancing.driver.nginx.limit_conn
            
  2. Check the virtual host access_log entries for 429 errors and see that they are not coming from upstream Message Processors and are coming directly from the router:
    cd /opt/apigee/var/log/edge-router/nginx/ grep "429 " org~env-port_access_log
            

Resolution

  1. Using the sshcommand, connect to your router nodes, one by one.
  2. Open the following file (create it if it doesn't exist):
    /opt/apigee/customer/application/router.properties
            
  3. Add the following line:
    conf_load_balancing_load.balancing.driver.nginx.limit_conn=25000
            
  4. Save the file.
  5. Make sure that file has the ownership of apigee:apigee:
    sudo chown apigee:apigee router.properties
            
  6. Restart the router:
    /opt/apigee/apigee-service/bin/apigee-service edge-router restart
            
  7. Validate with the following command to verify that the property is set:
    /opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_load_balancing_load.balancing.driver.nginx.limit_conn
            
  8. Repeat on each router.