[mythtv-users] mythconverg/program is marked as crashed
Michael T. Dean
mtdean at thirdcontact.com
Mon Jan 25 11:47:01 UTC 2016
On 01/25/2016 12:37 AM, David L wrote:
> mythfilldatabase stopped working for me about a month ago. I get
> errors like this:
> 016-01-24 21:18:01.068920 E Error preparing query: DELETE FROM
> program WHERE starttime >= :FROM AND starttime < :TO AND chanid =
> :CHANID ;
> 2016-01-24 21:18:01.068931 E Driver error was [2/144]:
> QMYSQL3: Unable to prepare statement
> Database error was:
> Table './mythconverg/program' is marked as crashed and last
> (automatic?) repair failed
>
> 2016-01-24 21:18:01.069814 E Error preparing query: DELETE FROM
> program WHERE starttime >= :FROM AND starttime < :TO AND chanid =
> :CHANID ;
>
> I googled a bit and found some people that had similar problems. I
> tried this recommended solution:
>
> mysqlcheck -r -umythtv -pxxxxxxxx mythconverg
>
> But that also gave me an error:
>
> mythconverg.program
> error : Can't create new tempfile: './mythconverg/program.TMD'
> status : Operation failed
>
> I have enough disk space, so that's not the problem. I also found
> people with similar problems but didn't quite follow the solutions.
> Any help would be appreciated.
>
The easiest approach--rather than dealing with mysqlcheck--and one
that's better because it also performs some other useful maintenance is
to run optimize_mythdb.pl .
https://www.mythtv.org/wiki/User_Manual:Periodic_Maintenance#Optimize_the_Database
It should be on your system, somewhere, but you can always just download
the script from:
https://github.com/MythTV/mythtv/raw/master/mythtv/contrib/maintenance/optimize_mythdb.pl
However, that will fail, too--for the same reason--until you fix the
problem. You seem to have specified a TEMP directory for MySQL
(mysqld--not the mysqlcheck script) that's too small (or full). See:
http://dev.mysql.com/doc/refman/5.7/en/temporary-files.html
and fix the issue with your TEMP directory, and restart mysqld. Then,
you can run optimize_mythdb.pl and things should be working fine.
>
> PS - I don't think I did anything to cause it to break AFAIK. It's
> possible the disk was temporarily full or the system was rebooted, but
> I did nothing to mythtv around the time it broke.
Generally that's all it takes--full disk during writes or MySQL server
crash/loss of power during writes.
Mike
More information about the mythtv-users
mailing list