You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "White, Tim" <Ti...@qwest.com> on 2008/01/25 18:01:47 UTC

Velocity Resource Locking?

Hi -
 
 We seem to be getting a situation where the Velocity Engine is hanging
and generating a stuck thread.
 
 <Jan 24, 2008 11:44:42 AM CST> <Error> <WebLogicServer> <BEA-000337>
<[STUCK] ExecuteThread: '20' for qu
eue: 'weblogic.kernel.Default (self-tuning)' has been busy for "622"
seconds working on the request "Htt
p Request: /MasterWebPortal/appmanager/home/Shop", which is more than
the configured time (StuckThreadMa
xTime) of "600" seconds. Stack trace:
Thread-606 "[STUCK] ExecuteThread: '20' for queue:
'weblogic.kernel.Default (self-tuning)'" <alive, in n
ative, blocked, priority=1, DAEMON> {
    -- Blocked trying to get lock:
org.apache.velocity.runtime.resource.ResourceManagerImpl@52f2b3c0[thi
n lock]
    jrockit.vm.Threads.sleep(Native Method)
    jrockit.vm.Locks.waitForThinRelease(Unknown Source)
    jrockit.vm.Locks.monitorEnterSecondStage(Unknown Source)
    jrockit.vm.Locks.monitorEnter(Unknown Source)
 
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Res
ourceManagerImpl.java:287)
 
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.
java:1102)
 
org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java
:498)
 
org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java
:473)

 
Becuase it's stucking on getResource, and the only loader we have
configured is the FileSystemResourceLoader, I'm wondering if it's
possible that that FileSystem is having issues, and it's leaving the
InputStream hanging.
 
Is there any way to configure a timeout for the resource loader?
 
Thanks,
 
Tim


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.

Re: Velocity Resource Locking?

Posted by Will Glass-Husain <wg...@gmail.com>.
Hi Tim,

That's interesting-- haven't seen this before.

The quick answer is "no".  The FileResourceLoader does not have a timeout.

You could cut & paste the class for the resource loader and make your own,
but include a timeout.  If you look at the code for
FileResourceLoader.javait's not that complicated.

WILL

On Jan 25, 2008 9:01 AM, White, Tim <Ti...@qwest.com> wrote:

> Hi -
>
>  We seem to be getting a situation where the Velocity Engine is hanging
> and generating a stuck thread.
>
>  <Jan 24, 2008 11:44:42 AM CST> <Error> <WebLogicServer> <BEA-000337>
> <[STUCK] ExecuteThread: '20' for qu
> eue: 'weblogic.kernel.Default (self-tuning)' has been busy for "622"
> seconds working on the request "Htt
> p Request: /MasterWebPortal/appmanager/home/Shop", which is more than
> the configured time (StuckThreadMa
> xTime) of "600" seconds. Stack trace:
> Thread-606 "[STUCK] ExecuteThread: '20' for queue:
> 'weblogic.kernel.Default (self-tuning)'" <alive, in n
> ative, blocked, priority=1, DAEMON> {
>    -- Blocked trying to get lock:
> org.apache.velocity.runtime.resource.ResourceManagerImpl@52f2b3c0[thi
> n lock]
>    jrockit.vm.Threads.sleep(Native Method)
>    jrockit.vm.Locks.waitForThinRelease(Unknown Source)
>    jrockit.vm.Locks.monitorEnterSecondStage(Unknown Source)
>    jrockit.vm.Locks.monitorEnter(Unknown Source)
>
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Res
> ourceManagerImpl.java:287)
>
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.
> java:1102)
>
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java
> :498)
>
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java
> :473)
>
>
> Becuase it's stucking on getResource, and the only loader we have
> configured is the FileSystemResourceLoader, I'm wondering if it's
> possible that that FileSystem is having issues, and it's leaving the
> InputStream hanging.
>
> Is there any way to configure a timeout for the resource loader?
>
> Thanks,
>
> Tim
>
>
> This communication is the property of Qwest and may contain confidential
> or
> privileged information. Unauthorized use of this communication is strictly
> prohibited and may be unlawful.  If you have received this communication
> in error, please immediately notify the sender by reply e-mail and destroy
> all copies of the communication and any attachments.
>



-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com