[mythtv-users] MythTV not really deleting files
Timothy Witham
twitham at sbcglobal.net
Wed Jan 31 06:39:51 UTC 2024
On 12/15/23 19:56, Peter Bennett wrote:
>
> On 12/15/23 12:35, Lloyd Chittenden wrote:
>> There are very few things in the deleted recordings group. These
>> appear to be old mythTV recordings that no longer appear in the app,
>> but are still on the disc.
>>
>> Lloyd
>
> There is a problem with the delete pending flag, which can result in
> recordings in limbo.
>
> https://forum.mythtv.org/viewtopic.php?t=4735
>
> https://forum.mythtv.org/viewtopic.php?f=36&t=2888
>
Fascinating! I noticed my perl code was listing 235 several year old
files that I could not find in frontend. Turned out it was this. I
added a --delete option to my code to clean this up and recovered over
300GB!
Since I was in perl and not SQL, I opted to do this like
flush_deleted_recgroup.pl did. This mostly worked, it caused backend to
start deleting the files one by one. But after several dozen, he
started complaining:
Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
mythdbcon.cpp:238 (OpenDatabase) [DBManager870] Unable to connect to
database!
Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
mythdbcon.cpp:239 (OpenDatabase) Driver error was [1/1040]:#012QMYSQL:
Unable to connect#012Database error was:#012Too many connections
Jan 30 13:27:59 mythtv mythbackend: mythbackend[2980]: E DeleteThread
mainserver.cpp:2411 (DoDeleteThread) MainServer: ERROR opening database
connection for Delete Thread for chanid 1181 recorded at
2021-01-20T14:30:00Z. Program will NOT be deleted.
Does this indicate a bug that each delete is a new connection that
doesn't close? Or did I do something wrong? Backend restart got the
deletes going again.
My code is mainly for distributing auto expires over multiple recording
disks. But now it also reports this, with optional cleanup, even if you
have just 1 disk. I can contribute it if it might be useful to others:
https://github.com/MythTV/mythtv/pull/849
-Tim
More information about the mythtv-users
mailing list