cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remi.Masson....@interforum.fr
Subject Re: Thread Stuck with ResourceLimitingPool
Date Fri, 20 May 2011 12:51:53 GMT
Hello,


> Hmm, it seems that your code is not closing/releasing the db pool
> connections correctly. At least it is the impression I got from the
> stack. 

To connect DB, I used XSP.

Code example :

        <esql:connection>
            <esql:pool>BAEWEB</esql:pool>
            <esql:execute-query>
                <esql:query><xsp:expr>requeteSQL</xsp:expr></esql:query>
                <esql:results>
                    <esql:row-results>
                        <reference>
<!-- ... --> 
</reference>
                                    </esql:row-results>
                </esql:results>
                <esql:no-results>
                        <error>No result.</error>
</esql:no-results>
            </esql:execute-query>
        </esql:connection>
        <xsp:logic>

I verified the generated code, the close is correctly done.


> Seeing the version you use of cocoon it seems an "old"
> development, 

Also, I replaced “old” version of by another one.
Now, the project use :
- avalon-framework-api  : 4.3.1
- avalon-framework-impl         : 4.3.1
- excalibur-pool-api            : 2.2.1
- excalibur-pool-impl           : 2.2.1

But, after load test, the same problem of stuck thread  appears :
            "[STUCK] ExecuteThread: '112' for queue: 
'weblogic.kernel.Default (self-tuning)'" id=184 idx=0x2bc tid=14738 prio=1 
alive, in native, waiting, daemon
 
                -- Waiting for notification on: 
java/lang/Object@0x161b5ea0[fat lock]
                at 
jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native 
Method)
                at java/lang/Object.wait(J)V(Native Method)
                at java/lang/Object.wait(Object.java:485)
                at 
org/apache/avalon/excalibur/pool/InstrumentedResourceLimitingPool.get(InstrumentedResourceLimitingPool.java:336)
                ^-- Lock released while waiting: 
java/lang/Object@0x161b5ea0[recursive]
                at 
org/apache/avalon/excalibur/pool/TraceableResourceLimitingPool.get(TraceableResourceLimitingPool.java:118)
                at 
org/apache/avalon/excalibur/pool/ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:126)
                ^-- Lock released while waiting: 
java/lang/Object@0x161b5ea0[fat lock]
                at 
org/apache/avalon/excalibur/datasource/ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:192)
                at 
org/apache/cocoon/components/language/markup/xsp/Cocoon2EsqlConnection.getConnection(Cocoon2EsqlConnection.java:64)
                at 
org/apache/cocoon/components/language/markup/xsp/AbstractEsqlConnection.getAutoCommit(AbstractEsqlConnection.java:82)
                at 
org/apache/cocoon/www/commun/recherche/index/recherche_liste_xsp.generate(org.apache.cocoon.www.commun.recherche.index.recherche_liste_xsp:526)
                at 
org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:530)
                at 
org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:173)
                at 
org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:681)
                at 
org/apache/cocoon/components/source/impl/SitemapSource.toSAX(SitemapSource.java:432)
                at 
org/apache/cocoon/components/source/SourceUtil.toSAX(SourceUtil.java:183)
                at 
org/apache/cocoon/forms/datatype/DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:69)
                at 
org/apache/cocoon/forms/datatype/DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:78)
                at 
org/apache/cocoon/forms/formmodel/Field.generateItemSaxFragment(Field.java:261)
                at 
org/apache/cocoon/forms/formmodel/AbstractWidget.generateSaxFragment(AbstractWidget.java:369)
                at 
org/apache/cocoon/forms/transformation/EffectWidgetReplacingPipe$WidgetHandler.process(EffectWidgetReplacingPipe.java:390)
                at 
org/apache/cocoon/forms/transformation/EffectPipe.endElement(EffectPipe.java:417)
                at 
org/apache/cocoon/components/sax/XMLTeePipe.endElement(XMLTeePipe.java:89)
                at 
org/apache/cocoon/components/sax/XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:100)
                at 
org/apache/cocoon/components/sax/XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:73)
                at 
org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:257)
                at 
org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:490)
                at 
org/apache/cocoon/components/treeprocessor/sitemap/SerializeNode.invoke(SerializeNode.java:120)
                at 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
                at 
org/apache/cocoon/components/treeprocessor/sitemap/SelectNode.invoke(SelectNode.java:102)
                at 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
                at 
org/apache/cocoon/components/treeprocessor/sitemap/PreparableMatchNode.invoke(PreparableMatchNode.java:130)
                at 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
                at 
org/apache/cocoon/components/treeprocessor/sitemap/PipelineNode.invoke(PipelineNode.java:126)
                at 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
                at 
org/apache/cocoon/components/treeprocessor/sitemap/PipelinesNode.invoke(PipelinesNode.java:101)
                at 
org/apache/cocoon/components/treeprocessor/TreeProcessor.process(TreeProcessor.java:336)
                at 
org/apache/cocoon/components/treeprocessor/TreeProcessor.process(TreeProcessor.java:277)
                at org/apache/cocoon/Cocoon.process(Cocoon.java:639)
                at 
org/apache/cocoon/servlet/CocoonServlet.service(CocoonServlet.java:1098)
                at 
javax/servlet/http/HttpServlet.service(HttpServlet.java:820)
                at 
org/apache/cocoon/servlet/ParanoidCocoonServlet.service(ParanoidCocoonServlet.java:317)
                at 
weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                at 
weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                at 
weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:292)
                at 
weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175)
                at 
weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3590)
                at 
weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                at 
weblogic/security/service/SecurityManager.runAs(SecurityManager.java:121)
                at 
weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
                at 
weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:2106)
                at 
weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1428)
                at 
weblogic/work/ExecuteThread.execute(ExecuteThread.java:201)
                at weblogic/work/ExecuteThread.run(ExecuteThread.java:173)
                at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
                -- end of trace

I also update pool-controler maximum to 32 (before, it was 16).


> did you had no connection to a db before or is this "old"
> code that suddenly throws this error?
The project did already had a db connection before. After five month in 
production, that suddenly throws this.


Thank you for the answer.




Rémi MASSON
Equipe Web - Interforum
Tel         :  01 49 59 12 72
E-mail   :  remi.masson.ext@interforum.fr



Thorsten Scherler <scherler@gmail.com> 
19/05/2011 12:26
Veuillez répondre à
users@cocoon.apache.org


A
users@cocoon.apache.org
cc

Objet
Re: Thread Stuck with ResourceLimitingPool






On Wed, 2011-05-18 at 19:50 +0200, Remi.Masson.EXT@interforum.fr wrote:
> 
> Hello, 
> 
> I used cocoon 2.1.5 on Weblogic 10.3. 
> 
> I request Oracle DataBase with cocoon framework with XSP. 
> 
> The configuration in cocoon.xconf is : 
> <datasources> 
>     <jdbc name="BAEWEB"> 
>       <auto-commit>false</auto-commit> 
>       <pool-controller max="16" min="0" oradb="true"/> 
>       <dburl>jdbc:oracle:XXX:@YYY:1521:ZZZ</dburl> 
>       <user>XYZ</user> 
>       <password>XYZ</password> 
>     </jdbc> 
>   </datasources> 
> 
> But, after one or two days, this thread stuck happen : 
> 
>             "[STUCK] ExecuteThread: '139' for queue:
> 'weblogic.kernel.Default (self-tuning)'" id=279 idx=0x10c tid=32143
> prio=1 alive, in native, waiting, daemon 
>                 -- Waiting for notification on:
> java/lang/Object@0xbea70f0[fat lock] 
>                 at
> jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native
> Method) 
>                 at java/lang/Object.wait(J)V(Native Method) 
>                 at java/lang/Object.wait(Object.java:485) 
>                 at
> 
org/apache/avalon/excalibur/pool/ResourceLimitingPool.get(ResourceLimitingPool.java:365) 

>                 ^-- Lock released while waiting:
> java/lang/Object@0xbea70f0[recursive] 

Hmm, it seems that your code is not closing/releasing the db pool
connections correctly. At least it is the impression I got from the
stack.  Seeing the version you use of cocoon it seems an "old"
development, did you had no connection to a db before or is this "old"
code that suddenly throws this error?

salu2


>                 at
> 
org/apache/avalon/excalibur/pool/ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:130)


>                 ^-- Lock released while waiting:
> java/lang/Object@0xbea70f0[fat lock] 
>                 at
> 
org/apache/avalon/excalibur/datasource/ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:222)


>                 at
> 
org/apache/cocoon/components/language/markup/xsp/Cocoon2EsqlConnection.getConnection(Cocoon2EsqlConnection.java:64)


>                 at
> 
org/apache/cocoon/components/language/markup/xsp/AbstractEsqlConnection.getAutoCommit(AbstractEsqlConnection.java:82)


>                 at
> 
org/apache/cocoon/www/commun/notice/notice_reference_xsp.generate(org.apache.cocoon.www.commun.notice.notice_reference_xsp:535)


>                 at
> 
org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:260)


>                 at
> 
org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:490)


>                 at
> 
org/apache/cocoon/components/treeprocessor/sitemap/SerializeNode.invoke(SerializeNode.java:120)


>                 at
> 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)


>                 at
> 
org/apache/cocoon/components/treeprocessor/sitemap/SelectNode.invoke(SelectNode.java:102)


>                 at
> 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)


>                 at
> 
org/apache/cocoon/components/treeprocessor/sitemap/PreparableMatchNode.invoke(PreparableMatchNode.java:130)


>                 at
> 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)


>                 at
> 
org/apache/cocoon/components/treeprocessor/sitemap/PipelineNode.invoke(PipelineNode.java:126)


>                 at
> 
org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)


>                 at
> 
org/apache/cocoon/components/treeprocessor/sitemap/PipelinesNode.invoke(PipelinesNode.java:101)


>                 at
> 
org/apache/cocoon/components/treeprocessor/TreeProcessor.process(TreeProcessor.java:336) 

>                 at
> 
org/apache/cocoon/components/treeprocessor/TreeProcessor.process(TreeProcessor.java:277) 

>                 at org/apache/cocoon/Cocoon.process(Cocoon.java:639) 
>                 at
> org/apache/cocoon/servlet/CocoonServlet.service(CocoonServlet.java:1098) 

>                 at
> javax/servlet/http/HttpServlet.service(HttpServlet.java:820) 
>                 at
> 
org/apache/cocoon/servlet/ParanoidCocoonServlet.service(ParanoidCocoonServlet.java:317) 

>                 at weblogic/servlet/internal/StubSecurityHelper
> $ServletServiceAction.run(StubSecurityHelper.java:227) 
>                 at
> 
weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) 

>                 at
> 
weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:292) 

>                 at
> 
weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175) 

>                 at weblogic/servlet/internal/WebAppServletContext
> $ServletInvocationAction.run(WebAppServletContext.java:3590) 
>                 at
> 
weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 

>                 at
> 
weblogic/security/service/SecurityManager.runAs(SecurityManager.java:121) 
>                 at
> 
weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2200)


>                 at
> 
weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:2106) 

>                 at
> 
weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1428) 

>                 at
> weblogic/work/ExecuteThread.execute(ExecuteThread.java:201) 
>                 at
> weblogic/work/ExecuteThread.run(ExecuteThread.java:173) 
>                 at jrockit/vm/RNI.c2java(IIIII)V(Native Method) 
> 
>                 -- end of trace 
> 
> 
> 
> Anybody have an idea to resolve this problem? 
> 
> 
> BR, 
> 
> Rémi MASSON
> Equipe Web - Interforum
> Tel         :  01 49 59 12 72
> E-mail   :  remi.masson.ext@interforum.fr

-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



Mime
View raw message