[ 
https://issues.apache.org/jira/browse/EL-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751800#action_12751800
 ] 

HÃ¥kan Jacobsson commented on EL-5:
----------------------------------

We're having this same problem in our web application. 
The server (running with Tomcat 5.5) stops responding and when I make a thread 
dump I get a lot of this:

"http-8088-Processor679" daemon prio=1 tid=0x0860f518 nid=0x582c waiting for 
monitor entry [0x06ea1000..0x06ea4140]
        at java.util.Collections$SynchronizedMap.get(Collections.java:1979)
        - waiting to lock <0x44a5b350> (a java.util.Collections$SynchronizedMap)
        at 
org.apache.commons.el.ExpressionEvaluatorImpl.parseExpressionString(ExpressionEvaluatorImpl.java:306)
        at 
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:250)
        at 
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
        at 
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924)

.....

We have a lot of EL expressions in our jsps. And we have a high load on the 
server.

Has anything further been done to solve this issue? Would it help to upgrade to 
Tomcat 6? Would it help to upgrade to Java 6?

> [el] Contention on global cache / parseExpression
> -------------------------------------------------
>
>                 Key: EL-5
>                 URL: https://issues.apache.org/jira/browse/EL-5
>             Project: Commons EL
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Matthias Ernst
>             Fix For: 1.1
>
>         Attachments: patch, patch-el-cache.txt
>
>
> The ExpresssionEvaluatorImpl maintains a static synchronized hashmap as a 
> global
> parser cache. In my tests, this proves to be a contention point in highly
> concurrent web access, even if the cache is already filled:
> "tcpConnection-8080-514" daemon prio=1 tid=0x08214890 nid=0x4e39 waiting for
> monitor entry [bd9ff000..bd9ff908]
>         at java.util.Collections$SynchronizedMap.get(Collections.java:1942)
>         - waiting to lock <0x45586ef0> (a 
> java.util.Collections$SynchronizedMap)
>         at
> org.apache.commons.el.ExpressionEvaluatorImpl.parseExpressionString(ExpressionEvaluatorImpl.java:306)
> ...
> Even pre-parsing the expressions through #parseExpression doesn't help: it
> parses the expression for syntactic correctness and returns an instance of
> JSTLExpression that, however, doesn't contain the parsing result. It is 
> reparsed
> on every evaluation.
> I propose
> * evaluator instance local caches that still need synchronization, but can be
> made thread-local, page-local oder whatever by the calling application / 
> container.
> * to actually maintain the parsing result in JstlExpression
> I would volunteer to develop the respective patches, if desired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to