Subsonic corrupting data when it crashes

Need help? Post your questions here.

Moderator: moderators

Subsonic corrupting data when it crashes

Postby crashoverride025 » Thu Jan 07, 2021 10:06 pm

I'm running Subsonic in a tomcat docker container, and I've noticed that when the container is taken down, it tends to corrupt the database mid write.

subsonic.yml

Code: Select all
version: '3'
services:
  subsonic:
    container_name: subsonic
    image: tomcat:9-jdk8
    ports:
       - 9080:8080/tcp
    restart: always
    volumes:
       - ~/subsonic/app:/usr/local/tomcat/webapps
       - ~/subsonic/logs:/usr/local/tomcat/logs
       - ~/subsonic/data:/var/subsonic
       - ~common/Podcast:/content/podcast
       - ~common/Music:/content/music



How can the database be repaired and how does subsonic handle this in tomcat when it's installed as a system service?

Code: Select all
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: error in script file line: 49345 java.io.IOException: org.hsqldb.HsqlException: Value too long
        at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:858)
        at net.sourceforge.subsonic.dao.AbstractDao.update(AbstractDao.java:68)
        at net.sourceforge.subsonic.dao.PlayerDao.deleteOldPlayers(PlayerDao.java:117)
        at net.sourceforge.subsonic.service.PlayerService.init(PlayerService.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
        ... 105 more
Caused by: java.sql.SQLException: error in script file line: 49345 java.io.IOException: org.hsqldb.HsqlException: Value too long
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
        at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
        at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
        at org.hsqldb.jdbcDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:208)
        at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)
        at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
        at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
        ... 119 more



Once it sees that the db is corrupted, the application will fail to start up.
crashoverride025
 
Posts: 5
Joined: Thu Jan 22, 2015 5:06 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 34 guests