Hi Sebastian,

There is a prof:gc() function, but that should only be used for debugging 
Is your Pending Update List applied to the collections after each call (do you 
see your changes in the db inbetween calls) ?
I had memory overflow issues during xquery update functions calls, but always 
when issued in the same script, because of saturated PUL.


Profiling Module - BaseX 
Signatures: prof:current-ms() as xs:integer: Summary: Returns the number of 
milliseconds passed since 1970/01/01 UTC. The granularity of the value depends 
on the underlying operating system and may be larger.

De : BaseX-Talk <basex-talk-boun...@mailman.uni-konstanz.de> de la part de 
Sebastian Guerrero <chap...@gmail.com>
Envoyé : jeudi 28 mai 2020 20:39
À : BaseX <basex-talk@mailman.uni-konstanz.de>
Objet : [basex-talk] RESTXQ - java.lang.OutOfMemoryError: Java heap space

Hi BaseX team!

A quick question.

Is there some known bug/common setting missing for RESTXQ and memory problems?

I have this simple module ( into /webapp, a .xqm file ) :

module namespace exe = 'http://site.com/execute';
%rest:POST function exe:update() {

I use it to execute some updates against some databases from different clients.

Everything works fine by a while, but after some time I get this error [1]:

java.lang.OutOfMemoryError: Java heap space

I noticed that every call to update() the memory grows and grows until it 
reaches the OutOfMemoryError. [2]

If I stop the HTTP server, the memory is released immediately. [3]

What I'm doing wrong?
Is there some command to execute the GC?
Is this a problem with "xquery:eval-update()"?
Am I using it in the wrong way?

Best regards,
[1] https://imgur.com/DrcbwQg
[2] https://imgur.com/fonmrhm
[3] https://imgur.com/SYFBFK8

Reply via email to