[mythtv-users] Remotely monitor Backend is running
Stephen Worthington
stephen_agent at jsw.gen.nz
Sat Oct 9 08:34:20 UTC 2021
On Sat, 9 Oct 2021 15:16:05 +0800, you wrote:
>
>
>> On 9 Oct 2021, at 2:58 pm, Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:
>>
>> On Sat, 9 Oct 2021 13:28:21 +0800, you wrote:
>>
>>
>>> In all my years of using myth it has ever 'ceased working' while the myth[front][back]end process 'continues running'
>>
>> There is a current bug that seems to be in the housekeeper database
>> cleanup where the backend stops responding for a minute or two while
>> the cleanup is running. Existing recordings continue without
>> problems, but the start of new recordings can be delayed - I get up to
>> 30 seconds missing at the start of recordings. If you are already
>> playing a recording, that keeps going, but mythfrontend is unable to
>> talk to mythbackend to start a new playback. This likely in only
>> noticeable where the database is a bit bigger than average. So if you
>> see mythfrontend being unresponsive, check
>> /var/log/mythtv/mythbackend.log for the housekeeper activity:
>>
>> root at mypvr:/var/log/mythtv# grep DBCleanup
>> /var/log/mythtv/mythbackend.log
>> Oct 9 17:41:44 mypvr mythbackend: mythbackend[163593]: I CoreContext
>> housekeeper.cpp:754 (Run) Queueing HouseKeeperTask 'DBCleanup'.
>> Oct 9 17:41:44 mypvr mythbackend: mythbackend[163593]: I HouseKeeping
>> housekeeper.cpp:144 (Run) Running HouseKeeperTask 'DBCleanup'.
>> Oct 9 17:47:43 mypvr mythbackend: mythbackend[163593]: I HouseKeeping
>> housekeeper.cpp:164 (Run) HouseKeeperTask 'DBCleanup' Finished
>> Successfully.
>>
>> Mythbackend is not unresponsive for the whole period that DBCleanup is
>> running, but in my case it is normally unresponsive for a minute or
>> two during that time. I have a huge database, so I see it for longer
>> than most. One of the devs who is doing the SAT>IP code for v32 has
>> had it happen to him while he was testing the new code, and I think he
>> was investigating, but that was a couple of months ago.
>
>
>Steven
>I really do not have an axe to grind, was mearly saying "this works well"
Mostly, for most people. But there are some who have ongoing
problems.
>But say you've stumbled over the 'unresponsive' bug, for me, shutdown of mythbackend takes 1 or 2 minutes then startup takes another 20 secs.
Shutdown taking a long time is likely a very old bug in all the MythTV
software - when a MythTV program is asked to shut down from the
outside (kill or kill -15), it mostly shuts down but there is one last
thread left running, doing nothing. If you ask it to shut down a
second time, that last thread will shut down and shutdown completes
normally. This happens with mythfrontend and mythbackend and likely
any other MythTV software that uses the same core routines to handle
its multitasking. See here for my fix for this in mythbackend:
https://lists.archive.carbon60.com/mythtv/users/627999
With this fix, shutdown is immediate. Startup still takes a while,
mostly spent testing all the tuners.
And see here for my fix for killing mythfrontend:
https://lists.archive.carbon60.com/mythtv/users/637565?page=last
>Also if the unresponsive delay is DB then maybe API calls behave normally.
No, API calls are also non-responsive - my gaps program using the API
to get the recording schedule times out with no response from
mythbackend.
>
>Since the objective is 'have fun' so no worries, but methinks the solutions talked about here are aimed at the wrong problem.
>
>ciao
>James
More information about the mythtv-users
mailing list