[daisy] Stack Overflow on Search

Karel Vervaeke karel at outerthought.org
Fri Feb 1 04:57:31 CST 2008


The problem is in fulltext_searchresult.xsl,
The template 'pages' is recursive and causes the stack overflow when there are too many pages.

As a temporary workaround you could disable the paging and remove the call to the pages template.
Keep an eye on the list, I'll have a quick look at a solution.

regards,
Karel

On Fri, 2008-02-01 at 10:05 +0100, Karel Vervaeke wrote:
> I just reproduced the problem, the exception occurs on the wiki side.
> 
> For reproducing I used the attached file.  When running daisy-js -f
> createdocs.js, 10000 documents are created.  Each document contains 100
> random words (actually 3 random syllables concatenated), except for the
> 50th word which is always the word 'frequent'.
> 
> Searching for the word 'frequent' using fulltext search worked for a
> very long (last time it worked, there were 12210 results, then some time
> later the occurred).  I'll try to find out what goes wrong and let you
> know what can be done.
> 
> regards,
> Karel
> 
> On Thu, 2008-01-31 at 11:20 -0800, Jill Giboney wrote:
> > We are experiencing an error when searching a site that has 17,000
> > documents. Most searches work fine on that site, but if a term is used
> > in 5,000 or 6,000 documents, we get the following error:
> > 
> >  
> > 
> > HTTP ERROR: 500
> > 
> > INTERNAL_SERVER_ERROR
> > 
> > RequestURI=/UG-Help/search
> > 
> >  
> > 
> > Caused by:
> > 
> > java.lang.StackOverflowError
> > 
> >             at sun.misc.FloatingDecimal.readJavaFormatString(Unknown
> > Source)
> > 
> >             at java.lang.Double.parseDouble(Unknown Source)
> > 
> >             at
> > org.apache.xpath.objects.XString.toDouble(XString.java:133)
> > 
> >             at org.apache.xpath.objects.XString.num(XString.java:102)
> > 
> >             at org.apache.xpath.operations.Plus.operate(Plus.java:46)
> > 
> >             at
> > org.apache.xpath.operations.Operation.execute(Operation.java:110)
> > 
> >             at
> > org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:67)
> > 
> >             at org.apache.xpath.XPath.execute(XPath.java:335)
> > 
> >             at
> > org.apache.xalan.templates.ElemWithParam.getValue(ElemWithParam.java:201)
> > 
> >             at
> > org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:224)
> > 
> >             at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
> > 
> >             at
> > org.apache.xalan.templates.ElemIf.execute(ElemIf.java:160)
> > 
> >             at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
> > 
> >             at
> > org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)
> > 
> >             at
> > org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246)
> > 
> >  
> > 
> > These three lines then repeat a number of times:
> > 
> >  
> > 
> >             at
> > org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246)
> > 
> >             at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
> > 
> >             at
> > org.apache.xalan.templates.ElemIf.execute(ElemIf.java:160)
> > 
> >             at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
> > 
> >             at
> > org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)
> > 
> >  
> > 
> > I added the following statements to myconfig.xml and tried cache sizes
> > of 30,000, 60,000 and 100,000, but still get the error.
> > 
> >  
> > 
> > <target path="/daisy/repository/documentcache"> 
> > <configuration> 
> > <documentCacheMaxSize>30000</documentCacheMaxSize> 
> > <availableVariantsCacheMaxSize>30000</availableVariantsCacheMaxSize> 
> > </configuration> 
> > </target>
> > 
> >  
> > 
> > Thanks for your help!
> > 
> >  
> > 
> > Jill Giboney
> > 
> > Arcadia Solutions LLC
> > 
> > 
> > _______________________________________________
> > daisy community mailing list
> > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> > mail to: daisy at lists.cocoondev.org
> > list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list