2nd time corrupt database issue in a month (1 Viewer)

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,749
    New Zealand
    New Zealand New Zealand
    Country flag
    Hi

    I'm pretty sure my problem relates to corrupted tvseries database, 2x within this month. Attached logs. Are there any suggestions on how I could avoid this problem? 2 weeks ago, I encountered this problem, and I fixed it by deleting the tvseries database file. Apologies if the problem doesn't relate to tv series.

    2014-06-29 11:36:44.139 [INFO][06]: Commit failed on this command: <select * from online_series where online_series.ID = 84947> (SQLiteClient: cmd:sqlite3_step err:ERROR detailed:bind or column index out of range query:select * from online_series where online_series.ID = 84947).
    [collapse]
    Mediaportal-error.log:

    [2014-06-29 11:36:44,123] [Error ] [DirectoryWorker] [ERROR] - SQLiteClient: cmd:sqlite3_step err:ERROR detailed:bind or column index out of range query:select * from online_series where online_series.ID = 84947
    [2014-06-29 11:36:44,997] [Error ] [14 ] [ERROR] - MediaPortal: Unhandled exception occured
    [2014-06-29 11:36:45,012] [Log ] [14 ] [ERROR] - Exception: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
    at System.Threading.Thread.StartInternal(IPrincipal principal, StackCrawlMark& stackMark)
    at System.Threading.Thread.Start(StackCrawlMark& stackMark)
    at System.Threading.Thread.Start()
    at MediaPortal.Plugins.MovingPictures.LocalMediaManagement.MovieImporter.Start()
    at MediaPortal.Plugins.MovingPictures.MainUI.MovingPicturesGUI.onCoreInitializationProgress(String actionName, Int32 percentDone)
    at MediaPortal.Plugins.MovingPictures.MovingPicturesCore.Initialize()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart() Message: Exception of type 'System.OutOfMemoryException' was thrown. Site : Void StartInternal(System.Security.Principal.IPrincipal, System.Threading.StackCrawlMark ByRef) Source : mscorlib Stack Trace: at System.Threading.Thread.StartInternal(IPrincipal principal, StackCrawlMark& stackMark)
    at System.Threading.Thread.Start(StackCrawlMark& stackMark)
    at System.Threading.Thread.Start()
    at MediaPortal.Plugins.MovingPictures.LocalMediaManagement.MovieImporter.Start()
    at MediaPortal.Plugins.MovingPictures.MainUI.MovingPicturesGUI.onCoreInitializationProgress(String actionName, Int32 percentDone)
    at MediaPortal.Plugins.MovingPictures.MovingPicturesCore.Initialize()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()[/collapse][DOUBLEPOST=1403999081][/DOUBLEPOST]If needed I can upload the database file...
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,348
    1,828
    Country flag
    @kiwijunglist, is the database db3 corrupt as well and fails an SQLite PRAGMA integrity check? If that's the case then I can at least offer you a workaround via batchscript I use. It automatically does a backup and restores any database on an integrity check. Sometimes the time involved in debugging all the conditions involved that cause a corruption are just not worth it when it is extremly random in nature.

    Auto-Backup/Restore script @ https://forum.team-mediaportal.com/threads/corrupted-database.120376/#post-1014075
     

    bribbon

    MP Donator
  • Premium Supporter
  • September 11, 2008
    470
    100
    Switzerland Switzerland
    Country flag
    I have for a long time no more corrupt database. I had this mostly when I had to choke when MediaPortal starting (PC reset). Was pronounced to access the database as I had to do the reset.

    In any case, thanks for the tip RoChess. I will try it
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,749
    New Zealand
    New Zealand New Zealand
    Country flag
    Thanks. I think the first corrupted database coincided with a power loss to my htpc. Not sure about the recent problem.

    I'll try your script. Thanks.

    It might be nice if tvseries could automatically do something similar.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,219
    New Zealand New Zealand
    Country flag
    when it is extremly random in nature.
    For what it's worth I've been seeing people report a corrupt TV Series database with increasing frequency in the last few months. IMHO it isn't a good look for My TVSeries or for MediaPortal in general. Obviously there's nothing anybody can do about corruption caused by unexpected power loss, HDD failure etc. access attempts, but what I'm seeing feels too co-incidental to be random. Unfortunately it is hard to quantify with hard facts.

    Anything we can do to assist getting this problem sorted, or are you still of the opinion the problem is completely random?
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,749
    New Zealand
    New Zealand New Zealand
    Country flag
    Could it be related to changing versions of mysql or possibly the increase in freq of people using other plugins that access the database e.g. mpsync or webmp etc (I don't use any of these plugins btw)

    If it is related to power cycle corruption it seems particularly vulnerable to this it would be nice if it could either be made more robust or if it had a built in auto corruption check on startup and restore function.
     
    Last edited:

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,219
    New Zealand New Zealand
    Country flag
    Could it be related to changing versions of mysql
    No. MySQL which is used for TV Server and SQLite which is used for MediaPortal and plugins are completely unrelated.

    Could it be related to ... the increase in freq of people using other plugins that access the database e.g. mpsync or webmp etc (I don't use any of these plugins btw)
    Yes absolutely. My understanding is any concurrent access - at file or database level, even from multiple threads within My TV-Series - would have the potential to cause problems. Granted the potential may not be that high, but it is there.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,348
    1,828
    Country flag
    The one comminality I can see between the majority of users who actually experience it is that they run a well-above average configuration. Shouldn't make a difference, but it seems to make things break easy. For me the only bug worth pursuing is a reproducable one, and that just has not been made possible yet for this one. It is easy to sort of force reproduction, and that is to unplug the power to your computer or harddisk right when MP-TVSeries is doing updates to the SQLite index.

    Maybe the users have a large series database, that takes a long time to verify and they have set their collection rescan time to sharp, so it goes into a constant SQLite update loop in the background. I've gone through the trouble to manually go into my MP-TVSeries collection and mark each 'Ended' show to be checked for "ignore on scan". But I've changed so many other things, so no idea if that is why the only time my MP-TVSeries database went correct is because I had concurrent RDP open and editing MP-TVSeries dbase and somebody else without me knowing held down power button on HTPC thinking it was "frozen". In some cases that was with multiple on/offs a week of entire HTPC, or months of 24/7 usage via MP-TVSeries playlists, over a timespan of at least the last 2 years. Of course I don't use standby/resume, for me the screen goes black, and the CPU idles, so maybe the problem lies in there, not enough confirmations if that is the comminality when corruption occurs.

    I did had corruption myself once a week from older LastMediaAdded plugin, which was harmless, but annoying and what inspired me to write the auto-backup/restore script, which was also a good idea for getting backups anyway :)
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,749
    New Zealand
    New Zealand New Zealand
    Country flag
    My setup is very basic plugins:
    TVSeries,MovPic,OnlineVideos,Trakt,IMDB+,Titan,Trailers (No TV Server/TV)
    But my database for tvseries and MovPic is HUGE!

    PS: Haven't got around to adding your script yet rochess ;-p
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,348
    1,828
    Country flag
    But my database for tvseries and MovPic is HUGE!
    Did you exclude any "Ended" shows from the import scan? And what is your import refresh/update timer set at, as well as the initial import delay setting?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 2
    B MP 1.23 First time click TV or Recorded TV fails, 2nd ... it will work General Support 5
    BlueMax1916 [confirm] Music: Every 2nd track skipped MediaPortal 2 30
    F 1.25.0 Display corruption Bugreports 0
    D MP2 - V2.1 Recorded TV - recording corrupted if MP client used while recoding in progress Older releases 20
    toricred Using TMM, How to Stop Importer From Going to The Movie Database for Data General 1
    H MP2 database won't keep in synch with recordings General 8
    F How to reset tv recordings database General 5
    A Synchronizing client databases MediaPortal 1 Talk 10
    R Problems accessing MySQL database remotely MediaPortal 1 Talk 0
    globaldonkey Music Database Error Listen Music 1
    R [solved] Files moved to new location - Easy way to update database? My TVSeries 7
    R Files moved to different location - Easy way to update database? Moving Pictures 2
    H [solved] Video database genres, sort titles and collection thumbnails Newcomers Forum 12
    G MP1 TV Server "failed to upgrade the database" using MS Sql Server Installation, configuration support 3
    D PC rebuild & MP2 upgrade - how to preserve database and settings? General 1
    H MP1.21F video database scan, can it be scheduled to automatically run in background General Support 5
    D Large xml database in My Movies Management. I remain unclear on use My Films as bridge to MP2.2 General 9
    ajs Sync databases by Media Sync Service MediaPortal 1 Talk 26
    J Database schema General 0
    W [solved] MP 1.20 Video IMDB no showing plot General Support 129
    hounddog How to get My Films working in MP 1.20 My Films 5
    C How well can MediaPortal handle 10,000+ recordings? MediaPortal 1 Talk 3
    H Database migration Archive 85
    D Single Seat Install - can another single seat use the same databases? Installation, configuration support 1
    Similar threads

























    Top Bottom