Re: Query exceeded predefined output-size-limit (1, 000, 000) for document fragments

Pieter Lamers <[email protected]> Wed, 19 Mar 2025 21:30:46 +0100
Newsgroups gmane.text.xml.exist
Message-ID <[email protected]>
Hi Alberto,

on a main module you can set a different size limit. It is reached when 
your output has too many nodes.
to get a max of 10M nodes use the following:

declare option exist:output-size-limit "10000000";

when I need to set a large output-size-limit in a function I use the 
following function (which could be simplified):

declare function my:set-output-size-limit( $new-limit as xs:integer ) as 
empty-sequence()
{
   let $output-size-limit-option as xs:string := 'exist:output-size-limit'
   let $set-output-size-limit := 
util:declare-option($output-size-limit-option, $new-limit cast as xs:string)
   return ()
};

Best,
Pieter


On 19/03/2025 16:21, Alberto Simões wrote:
> Hello
>
> I am getting this message: Query exceeded predefined output-size-limit 
> (1,000,000) for document fragments  (see below complete log for error).
>
> What is the cause, and how can I fix it?
> Thanks
>
> lexmart_exist.1.vi427hqb2os7@academia    | 19 Mar 2025 15:12:32,497 
> [qtp478864778-47] WARN  (XQueryWatchDog.java [proceed]:174) - Query 
> exceeded predefined output-size-limit (1,000,000) for document 
> fragments: {
> lexmart_exist.1.vi427hqb2os7@academia    |     for  <130>
> lexmart_exist.1.vi427hqb2os7@academia    |         $resource in $subset
> lexmart_exist.1.vi427hqb2os7@academia    |       <131>
> lexmart_exist.1.vi427hqb2os7@academia    |         let  <131>
> lexmart_exist.1.vi427hqb2os7@academia    | $isCollection := $resource 
> = "/",
> lexmart_exist.1.vi427hqb2os7@academia    |             let  <132>
> lexmart_exist.1.vi427hqb2os7@academia    | $path := if (
> lexmart_exist.1.vi427hqb2os7@academia    | $isCollection
> lexmart_exist.1.vi427hqb2os7@academia    |                 ) then
> lexmart_exist.1.vi427hqb2os7@academia    | 
> {http://www.w3.org/2005/xpath-functions}concat($collection 
> <http://www.w3.org/2005/xpath-functions}concat($collection>, $resource)
> lexmart_exist.1.vi427hqb2os7@academia    | else
> lexmart_exist.1.vi427hqb2os7@academia    | 
> {http://www.w3.org/2005/xpath-functions}concat($collection 
> <http://www.w3.org/2005/xpath-functions}concat($collection>, "/", 
> $resource)
> lexmart_exist.1.vi427hqb2os7@academia    |             return
> lexmart_exist.1.vi427hqb2os7@academia    | where <137>
> lexmart_exist.1.vi427hqb2os7@academia    | 
> sm:has-access(untyped-value-check[xs:anyURI, $path cast as xs:anyURI], 
> "r")
> lexmart_exist.1.vi427hqb2os7@academia    |
> lexmart_exist.1.vi427hqb2os7@academia    |
> lexmart_exist.1.vi427hqb2os7@academia    | }
>
> -- 
> Alberto Simões
>
>
> _______________________________________________
> Exist-open mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/exist-open

-- 
Pieter Lamers
John Benjamins Publishing Company
Postal Address: P.O. Box 36224, 1020 ME AMSTERDAM, The Netherlands
Visiting Address: Klaprozenweg 75D, 1033 NN AMSTERDAM, The Netherlands
Warehouse: Kelvinstraat 11-13, 1446 TK PURMEREND, The Netherlands
tel: +31 20 630 4747
web:www.benjamins.com

_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open