Ok, I'm still seeing an issue. Subsonic 5.0, Ubuntu and Java 1.7, 2GB of RAM. My configuration is as such:
root@bonusroom:/etc/default# cat subsonic
#
# This is the configuration file for the Subsonic service
# (/etc/init.d/subsonic)
#
# To change the startup parameters of Subsonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 200 MB, use
# the following:
#
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
SUBSONIC_ARGS="--max-memory=700"
#was 150
# The user which should run the Subsonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.
SUBSONIC_USER=root
root@bonusroom:/etc/default#
root@bonusroom:/usr/share/subsonic# cat subsonic.sh
#!/bin/sh
###################################################################################
# Shell script for starting Subsonic. See
http://subsonic.org.
#
# Author: Sindre Mehus
###################################################################################
SUBSONIC_HOME=/var/subsonic
SUBSONIC_HOST=0.0.0.0
SUBSONIC_PORT=4040
SUBSONIC_HTTPS_PORT=0
SUBSONIC_CONTEXT_PATH=/
SUBSONIC_MAX_MEMORY=500
#SUBSONIC_MAX_MEMORY=150
SUBSONIC_PIDFILE=
...
When I'm using the web interface and click on Settings -> clean-up database, I receive the following:
Exception org.springframework.dao.TransientDataAccessResourceException
Message PreparedStatementCallback; SQL [select max(id) from album where not present]; out of memory; nested exception is java.sql.SQLException: out of memory
Java version Oracle Corporation 1.7.0_51
Operating system Linux 3.2.0-4-686-pae
Server jetty-6.1.x
Memory Used 40 of 189 MB
Doesn't seem like its out of memory. Despite my settings above, it only shows 189MB of memory being allocated. How come? Do I need to adjust another file?
*** Edit ***
I think my issue was sorted out by deleting the /var/subsonic/db and /var/subsonic/jetty directories contents and rebuilding the database. I don't entirely understand what was going on in the DB, but deleting the DB and running the media scan again succeeded....