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 … 18 19 20 21 22 34 Next »
Database locked error

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

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#1
2021-06-06, 08:09 AM
Since upgrading to NextPVR v5.1.2.210603 shortly after its release (and v5.1.2.210601 prior to that) I have been getting 'Database Locked' errors throughout the day. The web ui is very slow to respond too, I guess due to these errors. I am at a loss to know what is locking the database as this PI is not used for anything else other than NextPVR/Comskip and has preformed flawlessly up to now.  I have attached the latest logs if that help;s.

Many thanks

Chris


Attached Files
.zip   logs-20210606-0857.zip (Size: 838.01 KB / Downloads: 6)
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
#2
2021-06-06, 08:43 AM
Further information

Once I could access the web ui I have also found that all my recordings (although I can see these are saved to disk), devices, channels and EPG data are missing, again presumably because the database is not available.

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
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#3
2021-06-06, 11:47 AM
I would start be checking the microSD card for errors, it's never a good choice for storing a database.

Then if you make your database available via external storage (Google Drive, OneDrive, Dropbox etc) we can have a look.

Martin
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#4
2021-06-06, 12:56 PM
Martin

To set the scene, this is a RPi4B with 4GB memory, running latest Rasbian/RaspberryPI OS patched up to date, which is natively booting from a USB mounted SSD - so no SD card involved (card not even inserted in RPi). It has been running this way for over a year with various versions of NextPVR without any problems.

I have copied the current database to my OneDrive account and it can be accessed via:

https://1drv.ms/u/s!Augnx5Vqx9WOgcRZXWla...g?e=C5YJdD 

Thanks for any help you can provide to help sort this problem out.

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
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#5
2021-06-06, 01:03 PM
Ok thanks for the clarification.

The database looks fine. During the update is it possible you used a backup or something and now npvr.db3 is now owned by root?

Martin
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#6
2021-06-06, 01:19 PM
Martin

I did what I normally do when a new release is made available, all run from the default 'pi' user account:

1. sudo apt update
2. sudo apt full-upgrde
3. sudo dpkg -i nextpvr-helper.deb

That's it.  Seemed to work OK immediately after the upgrade but in the last few days I have started to get the 'database is locked' errors.  

Looking at the /var/opt/nextpvr folder I can see:

-rw-r--r-- 1 nextpvr nextpvr 37699584 Jun  3 21:35 npvr.db3

It was this file I copied to OneDrive, whether the ownership has got changed in that version due to the copy I don't know. The only file owned by root in that directory is an old copy of config.xml (config_071220.xml)

Coincidently it turns out I had a similar problem at around the same time last year (see https://forums.nextpvr.com/showthread.php?tid=61098) which was  eventually fixed by an update from Sub.

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
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#7
2021-06-06, 01:28 PM (This post was last modified: 2021-06-06, 03:39 PM by mvallevand.)
I was putting out the permission change as a suggestion. That is an odd coincidence from last year for sure. Hopefully sub can help you out again. The SD table is certainly getting huge mine is around 120K+ rows now and you have 90K if indeed that table is an issue.

The date of the database i guess show the last update time so there are no epg updates either . Do you see any temp files in that folder (database dash something)

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#8
2021-06-06, 06:10 PM
I've had a good look at the logs, but it's not clear what activities started the issue. If you reboot and restart the application, does the issue recur?
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#9
2021-06-07, 08:06 AM (This post was last modified: 2021-06-07, 08:10 AM by ceejayemm.)
Sub

A reboot seems to have sorted this problem. The Web UI is back up to speed, guide, devices and channels restored and some recordings catching up from alternative transmissions. The remaining missed recordings I can live without.  I have attached the logs from immediately after the reboot in case this throws any further light on the issue.

Thanks for Martin's and your help in sorting this out for me.

Regards.

Chris


Attached Files
.zip   logs-20210607-0849.zip (Size: 502.95 KB / Downloads: 1)
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
#10
2021-06-08, 08:16 AM
Sub

Following the reboot yesterday morning I was able to make several recordings until the SD refresh started at 02:45 today. After that I am getting the 'Database is Locked' error again.  I have uploaded the log files for you to see. Looking through these logs I see there might be several items of interest to this problem (all in file nrecord.log.1):

2021-06-07 20:05:00.375 [ERROR][9] writer.Close() did not complete in a timely fashion

2021-06-07 21:05:00.260 [ERROR][9] writer.Close() did not complete in a timely fashion

2021-06-08 02:47:44.529 [ERROR][53] Unexpected error in SchedulesDirectArtwork: Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.

2021-06-08 02:47:47.302 [ERROR][20] (23 - CCXTV): Date requested (2021-06-08) not within  ->  for stationID 116252.


The first two errors occurred at the end of recording of a TV program which I record each week, the recording .TS files seem to be Ok though.

The third error occurred around 2 mins into the SD EPG update process and is the first indication the database is locked and seems to be related to the artwork update (?)

The fourth error is then repeated (in various forms) several times but I think, although something odd, it might be a red herring (caused by error 3 ?)

I also have lots of errors like:

[ERROR][55] Unexpected error parsing EPGEvent xml: System.NullReferenceException: Object reference not set to an instance of an object.
  at NUtility.EPGEvent.Parse(String xml)

These all relate to video files I have imported to NextPVR manually, I know they can be fixed by saving the relevant TS file, deleting the Recordings entry, creating a 'decent' xml file for each recording and reimporting - I just haven't got round to biting the bullet that this needs.  If there is a quick way to update the database (?) to sort these problems out I would be glad to hear about it.

Chris


Attached Files
.zip   logs-20210608-0841.zip (Size: 1.06 MB / Downloads: 2)
Server          NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client:         Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  update of the media database kfmf 9 812 2024-11-17, 12:09 PM
Last Post: mvallevand
  No device listed -- error saving capture source: SQLite Error 1: 'no such column: −1' skrottapple 46 5,029 2024-04-13, 10:27 PM
Last Post: skrottapple
  Different Errors depending on channel (no tuner found/transcoding Error) idefixrc 3 887 2023-11-21, 12:45 PM
Last Post: mvallevand
  Nextpvr unaccessable from Jellyfin with 401 error Simonzzzz 5 1,408 2023-11-20, 10:28 AM
Last Post: Simonzzzz
  Recording length error VCR58 20 2,418 2023-11-12, 11:46 PM
Last Post: mvallevand
  "Unexpected error scanning for other devices" BlackJack 2 823 2023-07-15, 03:03 PM
Last Post: BlackJack
  HTTP ERROR 500 PJosses 17 2,176 2023-02-16, 05:17 PM
Last Post: PJosses
  Error installing NextPVR on Linux Mint 21 ag100pct 9 2,195 2022-08-17, 02:01 AM
Last Post: mvallevand
  Sometimes pi unresponsive, tuner locked, still recording? TheRealRoland 4 1,338 2022-08-02, 07:19 PM
Last Post: TheRealRoland
  multi-tuner error spagio 7 1,500 2022-06-09, 12:07 AM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode