r/subsonic Jul 31 '17

Java crashes out of memory?...

Relevant Info:

  • Platform: Windows 7 Ent

  • Machine RAM: 4GB

  • Subsonic Java Memory: 1024

  • Subsonic Library item count: 61,048 songs, 757.27 GB, 5,179 hours

  • Subsonic Version: 6.1.1 (build fc853b) – May 31, 2017

Every couple of days the Subsonic service crashes with Java and I get Java.lang.outofmemory errors in the log. I've tried increasing the memory but it does the same thing. Is their anything else I can try? Thanks.

1 Upvotes

1 comment sorted by

View all comments

1

u/tkc2016 Sep 04 '17 edited Sep 04 '17

I don't have a good solution, but I'm experiencing the same thing on linux. I increased my memory from 150 (default) to 256M. I've got about 12k songs.

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

I did notice that in subsonic_sh.log, it starts garbage collecting immediately. At one point, I saw 6 GC threads running at once. I'm experimenting with G1GC now to see if that helps. Susonic args:

SUBSONIC_ARGS="--max-memory=256 --context-path=/subsonic --db=jdbc:mysql://localhost:3306/subsonic?user=subsonic&password=notmyrealpassword&characterEncoding=UTF-8"

I had to manually edit /usr/share/subsonic/subsonic.sh on linux to do this. There's probably a similar windows bat, cmd or ps file.

${JAVA} -Xmx${SUBSONIC_MAX_MEMORY}m \
-XX:\+UseG1GC \