What happens when the WebContainer (WebSphere) thread pool is fully used and a new request is received?

You have a question about WebSphere and can't find anything in the documentation ...

What happens when the WebContainer thread pool is fully used and a new request is received? I am talking about a situation where everyone is being used, and we have reached the maximum thread pool size, which means that a new one cannot be created to process the request.

Will the request: - crash immediately, and the response will contain some kind of error? - WAS somehow "put" a request for a given period and process it when one of the threads returns to the pool? Could some error / timeout occur if the wait time is too long? - WAS will be the "queue" of the request for an indefinite period, and the timeout can occur only on the user side (web browser / application)?

+7
java web-applications threadpool websphere
source share
1 answer

The exact behavior is probably undocumented, so the details can be changed between versions to improve the behavior. You can probably infer the behavior by looking at javacores or by collecting information from different documents, for example the BoundedBuffer section of this IBM WebSphere Application Server Cookbook document:

The thread pool request buffer is essentially behind the thread pool. If the thread pool has the maximum size and all threads are sent, then work will be queued in requestBuffer. The maximum requestBuffer size is equal to the thread pool maximum size; however, if the work block is executed on a thread pool with the blocking mode EXPAND_WHEN_QUEUE_IS_FULL_ERROR_AT_LIMIT or EXPAND_WHEN_QUEUE_IS_FULL_WAIT_AT_LIMIT, then the maximum size of ThreadPoolMaxSize * is 10. When requestBuffer is filled, then it only starts up for the first time (this is WSVR0629I). When the requestBuffer is full, the work will either wait or throw a ThreadPoolQueueIsFullException, depending on how the unit of work is executed.

In practice, this means that after the maxThreads threads are busy doing work, additional maxThreads requests will be queued in a limited buffer, and when this buffer is full, the socket stream will block until it can queue the work, and this means that further incoming requests will be blocked until the stream becomes available and makes a space in the limited buffer.

+7
source share

All Articles