NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 24 25 26 27 28 … 34 Next »
Database locked

 
  • 0 Vote(s) - 0 Average
Database locked
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#1
2020-06-07, 08:23 AM (This post was last modified: 2020-06-07, 08:23 AM by ceejayemm.)
Over the last few days I have noticed that a number of scheduled recordings have been missed, not failed but they continue to be in a 'Pending' state. A couple of these have been automatically rescheduled (?) to another time - Emmerdale and Coronation St to today, Sunday June 7th, at 09:00 (ITV3) and 07:30 (ITV3) respectively. However, in the case of Coronation St the pending start time has passed and it is still showing as 'Pending', Emmerdale has not yet reached its rescheduled start time but I kind of expect the same to happen.

On checking the logs I can see that from 2020-06-07 02:46:37.244 the database is being reported as locked, this continues to be reported until 2020-06-07 06:59:33.682. My SD update starts at 02:45 each day. I have recently started putting my NAS to sleep, unless disk activity is detected, from 22:00 to 07:00 each day. My recordings are held on a NAS NFS share but all the rest of my my NPVR setup, including the database, is held on the RPI4 local micro SD card I use to run NPVR and this does not sleep. 

It seems a bit of a coincidence that the NAS recordings share might be asleep when this problem starts to occur but should it be being used during a guide refresh from SD ? I would expect the PI to be able to refresh its guide / database when the NAS share is asleep. I could see it as a problem when recordings are due but the share would have been available well before Coronation St should have started recording and it doesn't account for the continued 'Pending' state of these recordings. The NAS share would NOT have been asleep when the previous recordings failed to start, and subsequently ended up in a 'Pending' state, last Friday (from 13:45 to 20:00) and which first alerted me to something being not right but which I haven't had time to investigate until just now.

I have attached the logs so you can see what appears to be happening.

Thanks as always for any help or advice you can provide, hopefully this ins't soemthing of my own making.

Chris


.zip   logs-20200607-0843.zip (Size: 1.48 MB / Downloads: 5)
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#2
2020-06-09, 08:16 AM
Surely it can't be right that access, or not, to the recordings folder also locks up the other system folders for NPVR ? I could see that a check that the recording folder was present prior to recording and/or playback would make sense but on the update of the Guide ? There is NO user activity at the time the SD update takes place. Once the NAS folder becomes available again at 07:00 then any 'Pending' recordings should be released to record at the next available time.

Chris
Server          NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client:         Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#3
2020-06-09, 09:48 AM
Ok, there might be some light appearing at the end of this tunnel. I rebooted my PI and on restart NPVR is now reporting ALL the previously 'Pending' recordings as 'Failed: Recording service not running at recording time' which make a lot of sense. May be if this message, rather than 'Database Locked' in the log files, had been shown in the first place I might have understood what was going on. So to fix this it would be nice if one or more of the folowing were possible:

1. NPVR checked prior to each recording (via an optional setting ?) if the recording service was running and if not attempted at that point to restart it. If it restarts all well and good but if not then a user friendly message would be nice. At least we would know it had tried.

2. It should be possible to write and run a script to check and restart the recording service if necessary via CRON, in my case at 07:01 each day. Unfortunately, coming from Windows, I don't yet have the Linux skills to write this, although I can follow instructions if they include all the relevant compete paths etc. My NPVR installation id basically a default install using Martin's .DEB installer with just the Recordings folder moved elsewhere (to my NAS).

3. Could the alternative Recordings folder settings (or something like this) in config.xml be used to point to a local (not NAS) disk based folder and used only if the main recordings folder is not available to ensure the Recording service keeps running in the event of a problem with the main Recordings folder ? In this way then it would be possible, if required, at a later time to manually move the recording file to the NAS folder and reimport the xml file to update the database.

Regards.

Chris
Server          NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client:         Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#4
2020-06-09, 10:23 AM
(2020-06-09, 09:48 AM)ceejayemm Wrote: Ok, there might be some light appearing at the end of this tunnel. I rebooted my PI and on restart NPVR is now reporting ALL the previously 'Pending' recordings as 'Failed: Recording service not running at recording time' which make a lot of sense.

The ... database locked ... messages were in nrecord.log ... This log file is written by the NextPVR Server recording service so it was running when it wrote the messages ...  I can't diagnose why your database was locked.

I know nothing about Linux ... I would fix this by re-installing Linux (for me it is Ubuntu) and then re-installing NextPVR.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#5
2020-06-09, 01:07 PM
I often see the database locked message, especially on the RPi but recently I saw it in jcole998's logs. This is something sub would have to diagnose when he has time.

Martin
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#6
2020-06-09, 07:37 PM
Graham / Martin

Thanks for your comments so far. I will wait and see whether Sub can suggest any fix for this problem.

Regards.

Chris
Server          NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client:         Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#7
2020-06-10, 03:50 AM
The database locked problem has happened when it was trying to update the Schedules Direct artwork in a background thread while the EPG update was happening. I've made a changed for the next build to clean up better if this happens again, so that the database is not left in a locked state.
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#8
2020-06-10, 07:10 AM
Sub

Thanks for this update. I will await the revised buld and let you know if this happens again.

Regards.

Chris
Server          NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client:         Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#9
2020-06-15, 09:11 AM
Sub

With the latest v5.0.6 release this issue seems to have been resolved.

Many thanks

Chris
Server          NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client:         Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#10
2020-06-15, 04:14 PM
Great!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  update of the media database kfmf 9 507 2024-11-17, 12:09 PM
Last Post: mvallevand
  Sometimes pi unresponsive, tuner locked, still recording? TheRealRoland 4 1,162 2022-08-02, 07:19 PM
Last Post: TheRealRoland
  Database locked error ceejayemm 56 8,768 2021-06-17, 08:38 AM
Last Post: ceejayemm
  OTA EPG and genres. No genres in database. hawkeye100 6 2,017 2020-07-05, 06:12 PM
Last Post: sub
  Database deletes recording entry when .ts deleted but transcode exists. vintdiesel 15 4,341 2019-08-19, 07:12 PM
Last Post: vintdiesel

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode