Configuring WebLogic Server Environments
WebLogic Server has features for detecting, avoiding, and recovering from overload conditions. WebLogic Server's overload protection features help prevent the negative consequences—degraded application performance and stability—that can result from continuing to accept requests when the system capacity is reached.
When system capacitiy is reached, if an application server continues to accept requests, application performance and stability can deteriorate. The following sections demonstrate how you can configure WebLogic Server to minimize the negative results of system overload.
In WebLogic Server, all requests, whether related to system administration or application activity—are processed by a single thread pool. An administrator can throttle the thread pool by defining a maximum queue length. Beyond the configured value, WebLogic Server will refuse requests, except for requests on administration channels.
Note: Administration channels allow access only to administrators. The limit you set on the execute length does not effect administration channel requests, to ensure that reaching the maximum thread pool length does not prevent administrator access to the system. To limit the number of administration requests allowed in the thread pool, you can configure an administration channel, and set the Max Open Socket Value for the channel.
Throttle the thread pool by setting the Max execute queue Length field in the Administration Console. (See Environments > Servers > Threads and select an execute queue.) The default value of this field is 65536.
An administrator can configure Work Managers to manage the thread pool at a more granular level, for sets of requests that have similar performance, availability, or reliability requirements. A Work Manager can specify the maximum requests of a particular request class that can be queued. The maximum requests defined in a Work Manager works with global thread pool value. The limit that is reached first is honored.
WebLogic Server refuses requests that create new HTTP sessions after the configured threshold has been reached. In a WebLogic Server cluster, the proxy plug-in redirects a refused request to another Managed Server in the cluster. A non-clustered server instance can re-direct requests to alternative server instance.
Administrators can configure WebLogic Server to exit upon an out of memory exception. This feature allows you to minimize the impact of the out of memory condition—automatic shutdown helps avoid application instability, and you can configure Node Manager or another HA tool to automatically restart WebLogic Server, minimizing down-time.
WebLogic Server checks for stuck threads periodically. If all application threads are stuck, a server instance marks itself failed, if configured to do so, exits. You can configure Node Manager or a third-part high-availability solution to restart the server instance for automatic failure recovery.
WebLogic Server has a new health state—
OVERLOADED—which is returned by the
ServerRuntimeMBean.getHealthState() when a server instance whose life cycle state is
RUNNING becomes overloaded. This condition occurs when Work Manager capacity is exceeded or as a result of low memory.
When WebLogic Server exits it returns an exit code. The exit codes can be used by shell scripts or HA agents to decide whether a server restart is necessary. See WebLogic Server Exit Codes and Restarting After Failure in Managing Server Startup and Shutdown.