[mythtv-users] Mythfilldatabase taking FOREVER

Mike Perkins mikep at randomtraveller.org.uk
Tue Jun 14 21:44:52 UTC 2022

On 14/06/2022 21:52, Larry Kennedy wrote:
> On Tue, Jun 14, 2022 at 5:26 AM Mike Perkins <mikep at randomtraveller.org.uk>
> wrote:
>> On 14/06/2022 02:50, Larry Kennedy wrote:
>>> On second look, queries are slow too.  Select from Person can take
>> upwards
>>> of 400ms:
>>> 2022-06-13 21:33:10.412506 I  MSqlQuery::exec(DBManager1) SELECT person
>>> FROM people WHERE name = 'Angel Parker' <<<< Took 323ms, Returned 1
>> row(s)
>>> If I run these same queries from SQL Workbench on a windows desktop, they
>>> are immediate, perhaps from caching. But I suspect something else might
>> be
>>> going on..
>>>> but I'm seeing inserts/replace commands that take over 800ms, so that
>>>> doesn't bode well for potentially thousands of inserts:
>>>> 2022-06-13 21:33:36.706803 I  MSqlQuery::exec(DBManager1) REPLACE INTO
>>>> credits        ( person,  chanid,  starttime,  role) VALUES ('6708',
>>>> '20892', '2022-06-30T10:00:00.000Z', 'producer')  <<<< Took 866ms
>>>> That suggests a mysql/mariadb database issue, no?
>> Maybe, maybe not :)
>> Is it at all possible that the user running the mfdb does not have
>> permissions to create or write in
>> the cache file? If it has to do a disk access for every single query, that
>> might explain your delays.
> Interesting.  How do I check this?  Is this an O/S file permission?  or a
> grant permission in the database?
If it were a grant permission you probably could not get in at all. I was speaking of file permissions.

A number of myth users run their mythfilldatabase jobs from users different than the one which runs 
the master backend, for various reasons. Just running mythtv-setup from a different user can cause 
directories and files to be created which mfdb cannot access, or which the backend cannot access 
properly. There are other ways permissions can be wrongly set.

It is worth a check.


Mike Perkins

More information about the mythtv-users mailing list