[mythtv-users] Problem with latest run of optimize_mythdb.pl

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Dec 28 00:51:19 UTC 2015


On Sun, 27 Dec 2015 13:56:39 -0600, you wrote:

>Bad news and good news, Hika.
>
>I was able to truncate the table and go through all the appropriate
>commands on the table to analyze, check, checksum, repair, and optimize it
>(definitely not in that order, but not absolutely certain the order I went
>through them).
>
>I was able to reload the recordedseek table from the backup.  However, when
>I went to run optimize_mythdb.pl again, I got the same error message even
>though I just got the okay from mysql on the command line.
>
>I opened up optimize_mythdb.pl and looked at line 38.  I saw it was trying
>to alter the table to re-order the records and defragment the table.  I
>then went back into mysql and tried the maintenance commands and got errors
>that weren't there before, including a message about not being able to
>create a temporary file named "/var/lib/mysql/mythconverg/recordedseek.TMM".
>
>It turns out that the first unsuccessful run of optimize_mythdb.pl must
>have crashed during work on the recordedseek table and left the temporary
>file in existence.  I found that it was the only *.TMM file in the
>directory so I deleted it, went into mysql and re-repaired it with the
>table maintenance commands.  When I ran optimize_mythdb.pl one more time,
>it succeeded with no error messages.  It appears the problem all along was
>the existence of the temporary file.
>
>Having now reported what resolved the problem, I am hastening back to my
>MythTV system to do a database backup and then launch jobs, as you
>suggested to create the seektable data for the recordings done in the last
>day.
>
>Many thanks for the help.  It got me started in the right direction, and
>although your suggested fix wasn't the solution, it led me to find more
>helpful error messages that finally tracked the problem (and solution) down.

Check the free space on your drives.  One reason for
optimize_mythdb.pl crashing like that with the *.tmm files open is if
it runs out of space writing the *.tmm file, or another temporary file
while the *.tmm file is big.  Since recordedseek is normally larger
than the rest of the database put together, that is the table it will
crash on if the space is too low.


More information about the mythtv-users mailing list