Indeed you’re just running out of memory the part of the memory you’re running out of is the so-called Heap space in Java, which is indeed controlled by the -Xmx setting (when starting commandline) (the -Xms setting determines the initial amount allocated when the server is launched) or the wrapper.java.maxmemory setting in wrapper.conf when running as a service.
If you have a machine that has a lot of memory, you could also give it more, like 1gb. Note that Java doesn’t take the maximum if it’s not needed.