Bugzilla – Bug 10840
MySQL fails some operations if tmpdir is running out of diskspace
Last modified: 2009-06-17 09:36:36 UTC
Created attachment 4712 [details] set tmptdir in my.tt There have been several reports about the scanner crashing at some point complaining about corrupted MySQL tables. Eg. http://forums.slimdevices.com/showthread.php?t=51361 The issue seems to occur pretty often on some NAS devices (QNAP) where /tmp is on a small ramdisk or other small partition. MySQL is then running out of diskspace during some actions. According to a report in the German forum setting tmpdir to a larger partition resolved the issue for him. I'd suggest we define tmpdir in my.tt to use our cache folder instead of leaving it to MySQL to determine the system's folder.
change 24779 - (7.3.3) move MySQL's tmpdir from default to our Cache folder. Some NAS devices run out of disk space due to small ram disk partition for /tmp. Will need to be merged manually into 7.4
See complaints in forum about this breaking mysql. Conjecture (which looks right on my system) is that mysql is running under a different UID than squeezecenter, and doesn't have permission to write in cache. In any case, IMHO you ought to point it at a mysqltmp directory in cache, not to cache itself. And then its natural to make that directory worldwrite just as /tmp is.
Doesn't MySQL run as the same squeezecenter user though?
My bad - I misread the ps output. The mysql started by squeeze does run under the squeezecenter uid on my debian etch system, and I haven't actually seen the problem that was reported. Just was too quick to chime in. Maybe the people having trouble are trying to use a server other than one started by squeeze?
Well, using an external MySQL would not be affected by this change, it only affects the built-in MySQL's tmpdir.
I reverted this change until we can figure out what's going on.
The problem here is that SC seems to be running the system's mysqld binary while still using its own instance on some systems. It doesn't just hook up to an already running mysqld. This seems to be leading to the crashes we've seen after this change. But imho the question still remains open why it would fail to write temporary files in the same folder it successfully writes the DB.
Would the following simpler patch work? Index: /Users/mh/Documents/workspace/7.3/server/MySQL/my.tt =================================================================== --- /Users/mh/Documents/workspace/7.3/server/MySQL/my.tt (revision 24759) +++ /Users/mh/Documents/workspace/7.3/server/MySQL/my.tt (working copy) @@ -12,6 +12,7 @@ basedir = [% basedir %] datadir = [% datadir %] +tmpdir = [% datadir %] language = [% language %] port = [% port %] socket = [% socket %] datadir obviously is writable. Don't know how this could fail.
Yeah let's just try it and see.
change 24912 - use tmpdir at the same location as datadir
Second try to mark this bug as fixed... positive feedback from QNAP/Synology users, and no negative reports by others.
This bug has been fixed in the 7.3.3 release version of SqueezeCenter! If you haven't already. please download the new version from http://www.logitechsqueezebox.com/support/download-squeezecenter.html If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.