MinimServer Forum

Full Version: Java heap space problem and correct fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I am running Minimserver on a Raspberry Pi 2 (1Gb RAM), using an external USB drive to hold a music collection of 1.4Tb, which is mostly FLAC and WAV.

I have often had 'out of heap space' crashes and have fixed this by increasing the maximum amount of heap space for the Minimserver Java process to 512Mb.

I have done this by editing in situ the file /home/pi/minimserver/bin/startd so that the 'java' runtime directive now explicitly specifies ' -Xmx512m' on the java command line.

I know that this is 'a bit of a hack' and is very likely to break when I next upgrade Minimserver, therefore, I would like to know how I should do this in a proper, supported fashion.

I have examined the code in $HOME/minimserver/bin/startd and notice that there is already the provision to specify JAVAOPTS run-time directives in the file $HOME/minimserver/etc/minimstart.config. I tried a few simple permutations of parameter specifications in order to use this mechanism, as it seems to be preferable to my brute-force approach described above. Unfortunately, I was unable to make Minimserver use any of my attempts, so I have stuck, for now, with my initial approach, as it does work.


a) is the use of this file (minimstart.config) the correct way to achieve what I'm trying to do? If not, what is the proper approach?

b) if it is the correct approach, could you please supply a simple one line specification that I can put in the file to make it work?


The file is named minimstart.conf (not config) and you should use this line:

javaopts = -Xmx512m
Thanks very much, that worked!


Reference URL's