Mantis - Resin
Viewing Issue Advanced Details
5153 minor always 07-24-12 18:13 07-25-12 14:57
TheScrumMeister  
ferg  
normal  
closed 4.0.18  
fixed  
none    
none 4.0.30  
0005153: JavaCompiler (compiling a jsp page) livelock when ThreadPool is full
When a JSP file requires recompilation (created or modified), the java compilation is executed on a thread from the ThreadPool. During the JSP compilation process all client requests that come in await the compilation process.

If the JSP page produces compile errors, thus cannot be compiled properly, the client requests queue up until the thread pool is out of threads. Once that happens, even if the JSP is updated to remove the compile errors, it is possible for a livelock to occur between the JavaCompiler waiting for a free thread from the thread pool, and the thread pool waiting for the JavaCompiler to compile the page properly.
JavaCompiler has a property MaxCompileTime that defaults to 2 minutes, is that configurable?

This issue was detected before, as seen in JavaCompiler.java line# 681:
// the compiler may not be well-behaved enough to use the ThreadPool

Can we change the compilation process run on its own thread? or at least call the ThreadPool.schedulePriority()?

There are no notes attached to this issue.