#226 Fills up disk with log file if db is corrupt

v1.0 (example)
open
nobody
None
5
2013-12-19
2013-12-19
alphapapa
No

Using Ubuntu Raring with minidlna 1.0.24. A while ago my free disk space went way down. I finally discovered that minidlna had a 3.9 GB /var/log/minidlna.log file filled with lines like this:

[2013/12/19 12:01:11] sql.c:41: error: SQL ERROR 11 [database disk image is malformed]

I rebooted, deleted the log file, then restarted minidlna, and then it created a new database:

[2013/12/19 12:01:11] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.15.2].
[2013/12/19 12:01:11] sql.c:41: error: SQL ERROR 11 [database disk image is malformed]
pragma journal_mode = OFF
[2013/12/19 12:01:11] sql.c:41: error: SQL ERROR 11 [database disk image is malformed]
pragma synchronous = OFF;
[2013/12/19 12:01:11] sql.c:41: error: SQL ERROR 11 [database disk image is malformed]
pragma default_cache_size = 8192;
[2013/12/19 12:01:11] sql.c:88: error: prepare failed: database disk image is malformed
SELECT UPDATE_ID from SETTINGS
[2013/12/19 12:01:11] sql.c:117: warn: sql_get_int_field: step failed: database disk image is malformed
PRAGMA user_version
[2013/12/19 12:01:11] minidlna.c:926: warn: Creating new database...

I don't know why it went bonkers with the log file, but that was really annoying. I had to run "find /home /var -type f -mmin -180 -exec du -hcs '{}' + | sort -h" to find out where my free space went.

Discussion