Configure ODR OutOfMemory prevention

We can create cell-level custom properties to prevent the on demand router (ODR) from running out of memory when the number of concurrent requests sent to the ODR increases.

Because the ODR is completely asynchronous, it can scale to an extremely high number of concurrent connections. If application server threads begin to slow down or hang due to some condition, such as a slow database, the number of concurrent requests through a single ODR can increase dramatically. To prevent the ODR from running out of memory due to the large number of connections that can accrue in the ODR in this scenario, the ODR automatically starts rejecting requests, and thus closing connections, when the heap utilization exceeds a maximum threshold.

  1. Set the following custom property to configure a percentage value that determines at what amount of heap usage the ODR rejects requests. If heap usage exceeds 90%, the ODR rejects any incoming request and a 503 error code is returned.

    1. In the console, select System administration > Cell > Custom properties > New.

    2. Specify the name of the custom property as ODR.heapUsage.max.

    3. Specify a value for the custom property. The default value is 90. To disable this feature, set the value to 100.

  2. Set the following custom property to configure the type of error code returned when a request is received and the heap usage exceeds the maximum threshold.

    1. In the console, select System administration > Cell > Custom properties > New.

    2. Specify the name of the custom property as ODR.heapUsage.errorCode.

    3. Specify a value for the custom property. The default value is 503.