Details
Description
Currently, when using the semaphore logic, trying to acquire the semaphore is done without specifying a timeout. In case of a thread leak the Servlet Container supplied thread will block indefinitely. Introducing a timeout on the acquire call provides a failsafe mechanism. On timeout a warning message should be logged stating that a request has been pending for the specified timeout, including details on the request. Though this avoids a particular thread leak in this area, the underlying problem causing this to happen still needs to be addressed in the future.
Basically, in the ThreadBlockingAdaptingServlet the Semaphore.acquire() method is invoked which blocks the container thread. This semaphore should be released in a timely fashion. However, in case it does not get released, it should not get stuck in the acquire() invocation for the remainder of the JVM lifespan. We should introduce a timeout and an error message to inform of the situation.
Basically, in the ThreadBlockingAdaptingServlet the Semaphore.acquire() method is invoked which blocks the container thread. This semaphore should be released in a timely fashion. However, in case it does not get released, it should not get stuck in the acquire() invocation for the remainder of the JVM lifespan. We should introduce a timeout and an error message to inform of the situation.
Changed Fix Version(s) to 1.8.2