In SoapExternalService, the invocation of the service happens in a thread taken out of the common thread pool. This invocation retrieves an HTTP connection from the connection pool. Assuming the max number of connections is small, and that many invocations happen simultaneously, other threads (retrieved from the same pool) will be waiting for a connection. As invocations are piling up, threads are retrieved from the pool and wait for a connection. As a result the thread pool get starved, waiting for a thread to be released.
Here one could think that this is a regular thread pool starvation scenario and that once a thread will release a connection, a thread will get it, do its job and get back to the pool. Nothing more that jobs sequentialization.
But actually this case is different because while the service invocation happens in thread A, the release of the HTTP connection takes place in yet another thread, thread B. And guess where Thread B comes from? The exact same thread pool we just starved. So, the connection release never gets a chance to happen. => Engine locked.
The immediate to fix is to increase the size of the connection pool. Actually the connection pool size should be greater that the thread pool size. That's what r763815 does.
A better solution would be to eliminate the need for Thread B, and do the connection release in the thread A.
ODE-577 tracks this.