Hi Steve,

I have trouble reproducing the errors that you are seeing. I inserted a
little test.xqy in my Modules database:

xdmp:document-insert("/test.xqy", text { '
  xquery version "1.0-ml";
  declare variable $i external;
  $i + $i
'})

Note: make sure to run the insert against Modules as document database..

And ran the following code with Modules as Modules database:

for $i in 1 to 100000
return try { xdmp:spawn("/test.xqy", (xs:QName("i"), $i), <options
xmlns="xdmp:eval"><static-check>true</static-check></options>) } catch ($e)
{ $e }

That ran in about 10 seconds on my machine without anything severe
happening.

Can you elaborate on your case, and tell which version of MarkLogic you are
using? Can you also create a small test case that should show the errors
you see?

Kind regards,
Geert


2014-07-31 6:56 GMT+02:00 Steve Spigarelli <[email protected]>:

> No change. But thanks for trying to help. I appreciate the effort.
>
>
> On Sun, Jul 27, 2014 at 1:26 PM, Geert Josten <[email protected]>
> wrote:
>
>> Hi Steve,
>>
>>
>>
>> I'm not entirely sure, as the documentation doesn't tell, but I'd expect
>> spawn to really execute your modules, and not just do a static-check. Try
>> invoke or eval instead, maybe that helps.
>>
>>
>>
>> Cheers,
>>
>> Geert
>>
>>
>>
>> *Van:* [email protected] [mailto:
>> [email protected]] *Namens *Steve Spigarelli
>> *Verzonden:* vrijdag 25 juli 2014 18:05
>> *Aan:* [email protected]
>> *Onderwerp:* [MarkLogic Dev General] spawn static-check
>>
>>
>>
>> I have a large number of files that I would like to check to verify that
>> they are valid XQuery. The way I've gone about doing this is using the xray
>> testing framework and then looping through all modules in my project with
>> xdmp:spawn and the static-check option.
>>
>>
>>
>> The problem is that after a few files (<100) I find that Marklogic
>> restarts after running out of memory due to these spawned static-checks.
>>
>>
>>
>> Any ideas on why this spawn check seems to be causing a memory leak?
>>
>>
>>
>> The memory does return to the system after a few minutes if I stop the
>> check before the crash.
>>
>>
>> Thanks for any ideas,
>>
>> Steve Spigarelli
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to