SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Increasing memory used by SongKong on MacOS

By default on MacOS SongKong will use upto a quarter of physical memory by default (for heap), and usually it will use alot less. But if you have a very large library or unusual configuration it is possible for SongKong to fail with the error

SongKong is short of memory, task has to be cancelled to prevent further problems Java heap space

In such cases it is worth temporarily increasing the amount of memory used to see if that resolves the issue

  • The bottom right hand corner of SongKong window shows the current/max memory usage in Mb, make a note of the max memory usage

  • Stop SongKong

  • Right click on /Application/SongKong and select Show Package Contents

  • Select Contents

  • Right click on Info.plist and select Open With TextEdit

  • Find the following line

    <string>-XX+HeapDumpOnOutOfMemoryError</string>

  • And below it add a new line to set max memory, so for example to set it to 4GB add

    <string>-Xmx4G</string>

    to set it to 8GB add

    <string>-Xmx8G</string>

  • Restart SongKong

  • You should now see the max memory usage in Mb has increased.

  • Hopefully this will resolve the memory issue

I have an M1 Mac with 8GB memory. I ran the Songkong fixsongs function on my unmatched music folder and received the following error:

" SongKong is short of memory, task has to be cancelled to prevent further problems Java heap space

I found the java calls on my disk at /Applications/SongKong.app/Contents/bin, in songkong.sh and songkongremotesh.sh

In both scripts the first two parameters were -Xms150m -Xmx1800m ; I changed them to -Xms150m -Xmx2800m.

It helped. The swap usage was increased, but SongKong ran through on a big collection.

Actually those scripts are not used when you run SongKong on a Mac by selecting SongKong in the Applications folder, they are only used if you run SongKong from the Terminal like you would for a linux application

Probably, the issue was resolved seond time round due to work done first time round.

OK Thanks! Understood.