[mythtv-users] Database damage?

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Feb 14 02:29:50 UTC 2021

On Sat, 13 Feb 2021 13:50:30 -0500, you wrote:

>> On Feb 13, 2021, at 11:12 AM, Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:
>> So a possible workaround would be to just add a delay of several
>> seconds after each time the rec.delete() call in line 129 of
>> find_orphans.py is run.  I would try adding "time.sleep(10)" after the
>> rec.delete() call.  You may need to also add an "import time" line at
>> the start of the file if it is not already there.  If that works, you
>> could just tell find_orphans.py to delete all the bad recordings and
>> leave it for a couple of hours while it happened.  I seem to remember
>> having to do something like that when I had problems with an even
>> older MythTV version.  If 10 seconds is insufficient, Mythbackend may
>> still crash at some point, but by the time it does it should have done
>> a lot of the deletes.
>Success!  I first tried a sleep interval of 2 seconds and it crashed after ~40 deletions.  I upped the interval to 4 seconds and it processed 120 zero byte recordings.  With an 8 second interval, it trundled through the remaining recordings and finished without error.
>I guess I’ve done my spring cleaning early this year!
>Thanks very much.

Excellent!  Mythbackend is pretty slow at doing deletions, so my
recommendation of 10 seconds was based on my experience with that,
plus a bit to be sure.  Fortunately, MythTV is pretty forgiving of
crashes, but it would pay to run a full database check again, just in

More information about the mythtv-users mailing list