cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33004] - Cocoon consumes 100% of CPU and never releases it
Date Tue, 11 Jan 2005 23:22:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33004>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33004





------- Additional Comments From masonjm@ah.org  2005-01-12 00:22 -------
After some debugging I've figure out which pipeline was causing the problem. The
problem only occurs during an exceptional case with a lot of data, so I've
rewritten some logic to prevent that case. However, I'm concerned that the same
issue may crop up elsewhere so I'd like to fix the underlying problem.

Here's a snippet from the sitemap that is causing the problem:

<map:match pattern="show-list.xml">
    <map:generate src="queries/userListQuery.xml" type="jx"/>
    <map:transform type="ldap"/>
    <map:transform src="stylesheets/sortUsers.xsl"/>
    <map:serialize type="xml" />
</map:match>

The jx template builds a LDAP query filter based on user input. The problem
occurs when the search filter returns a large number of results (18000+). The
sort stylesheet seems to choke.

Here's the results of a ldap transform that returns a single user:

<?xml version="1.0" encoding="ISO-8859-1"?>
<ldap-query xmlns:ldap="http://apache.org/cocoon/LDAP/1.0"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    <!--ldap:attribute>fullName</ldap:attribute-->
    <!--ldap:attribute>l</ldap:attribute-->
    <!--ldap:attribute>telephoneNumber</ldap:attribute-->
    <!--ldap:attribute>mail</ldap:attribute-->
    <!--ldap:attribute>facsimileTelephoneNumber</ldap:attribute-->
    <!--ldap:attribute>groupMembership</ldap:attribute-->
    <results xmlns="http://apache.org/cocoon/LDAP/1.0">
        <user>
            <uid>MasonJM</uid>
            <givenName>James</givenName>
            <sn>Mason</sn>
            <title>Programmer/Analyst</title>
            <initials>M</initials>
        </user>
    </results>
</ldap-query>

And here's the sorting xsl:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:ldap="http://apache.org/cocoon/LDAP/1.0"
        xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
        exclude-result-prefixes="xsl ldap jx">

    <xsl:template match="/">
        <ldap-query>
            <results>
                <xsl:for-each select="/*/*/user">
                    <xsl:sort select="sn"/>
                    <xsl:sort select="givenName"/>
                    <xsl:sort select="initial"/>
                    <user>
                        <xsl:apply-templates/>
                    </user>
                </xsl:for-each>
            </results>
        </ldap-query>
    </xsl:template>

    <xsl:template match="@*|node()" priority="-1">
        <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
    </xsl:template>

</xsl:stylesheet>

The disturbing thing is that I can't reproduce the problem when saving the xml
to a file an running it through a simple pipeline with just the transform. When
processing a file the transform doesn't work because it actually notices that
all of the <user> nodes are in the 'ldap' namespace (it doesn't notice this when
doing the transform directly from LDAP). After fixing the .xsl to match nodes in
the ldap namespace the transformation completes but all of the output nodes have
the namespace declarations that the tranform is supposed to be excluding.

Any ideas?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message