Hi Jacob,
The memory limit of the BaseX server process can be limited via the JVM -Xmx option in the BaseX startup scripts. If the maximum amount of assigned memory is exceeded, heap space errors will be raised.
I am not sure, however, if this is what you are asking for, because you were looking for an option that does not raise heap space errors, right?
If you use xquery:eval, you can specify a maximum memory limit for a single client [1]. This function is e.g. used in our DBA in order to avoid that queries sent from the client will compromise the BaseX server. As all threads run in the same JVM, it’s hard to guess how much memory is really spent by a single process; but at least it works to kill real memory killers.
I haven’t found much documentation on the MongoDB cache_size option. Could you possible give us some more infos what it does, and what happens if a process requires more than the assigned memory?
Best, Christian
[1] http://docs.basex.org/wiki/XQuery_Module#xquery:eval
On Fri, Apr 7, 2017 at 4:02 AM, Jacob Borisov jacobborisov@gmail.com wrote:
Hello. Is it possible to hardly limit a maximum memory consumption of a BaseX server instance process (something like a cache_size option in MongoDB) avoiding getting Java heap space errors simultaneously? Or, in the current implementation, it's required for the process to be able to allocate memory enough for storing a whole data set of the currently accessed database? Thanks.