How to increase Presto JVM off-heap memory allocation?

I’ve got a fresh install of Presto with mashups imported from another project. However, when I try and run the mashup, and some are very simple, I get:

JBPSASCE0005 - Failed to handle given request. Error = JBPEMMLCEE0009 - Error executing Mashup Script : An attempt was made to allocate more off-heap memory than the JVM can allow. The limit on off-heap memory size is given by the -XX:MaxDirectMemorySize command (or equivalent).

Now the obvious thing is to increase the JVM memory allocation but I can’t find how to do it. The mashups up work just fine on the VM that they came from.

I’m finding documentation for 2 methods. The 1st involves creating a jvm.config file, but this doesn’t seem to be working, and I can’t find anything like it on the VM. The other mention a prestoenv.bat file, but I can’t find any such file in my install or the VM install. So I’m at a bit of loss as to what it is I need to do.

Nicholas Adams

Hi Nicholas,

You can set JAVA_OPTS in the file (Linux) / prestoenv.bat (Windows) e.g:

JAVA_OPTS=“-XX:PermSize=512M -XX:MaxPermSize=1024M -Xms4096m -Xmx8192m”

Xms: initial heap size
Xmx: maximum heap size