Sunday, October 30, 2011

Stuck Threads when using JCA FileAdapter

you will notice that the Server Health has a Warning, and there are 5 stuck threads

one of this type:


"[STUCK] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'" TIMED_WAITING

java.lang.Thread.sleep(Native Method)

oracle.tip.adapter.file.inbound.PollWork.run(PollWork.java:369)

weblogic.work.ContextWrap.run(ContextWrap.java:41)

weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)

weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

weblogic.work.ExecuteThread.run(ExecuteThread.java:178)



and 4 of this type:


"[STUCK] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock oracle.tip.adapter.file.inbound.FilesToProcess@4bdddc TIMED_WAITING

java.lang.Object.wait(Native Method)

oracle.tip.adapter.file.inbound.FilesToProcess.dequeueToProcess(FilesToProcess.java:101)

oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:269)

weblogic.work.ContextWrap.run(ContextWrap.java:41)

weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)

weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

weblogic.work.ExecuteThread.run(ExecuteThread.java:178)




according to Oracle documentation for the DB adapter this is normal. They don't mention File Adapter....


The solution is to create a WorkManager with the option “ignore stuck threads” and assign it as a dispatch policy to each Proxy Service using the FileAdapter

No comments: