SQLiteDatabase Plugin for MP2 (1 Viewer)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I've tried it several times to reproduce this issue. I can't. On my system the installation, no matter if it's a upgrade from A3 or a clean install, is working flawlessly. What is different here?
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Thanks for testing, Lehmden!
    That's really interesting... (and a rare case: The dev says it can't work, but the tester says it does :D )
    When you say "clean install" does that mean that you deleted your c:\ProgramData\Team MediaPortal\MP-2 Server directory as well before installing?
    And our of curiosity, could you please post your installer log?
    Thanks again, Michael
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    When you say "clean install" does that mean that you deleted your c:\ProgramData\Team MediaPortal\MP-2 Server directory as well before installing?
    I've deleted the whole Windows. So more clean isn't possible ;)

    could you please post your installer log?
    There is none. I'm pretty sure I don't have deleted any logfiles, but can't find it.:confused:

    I first had done an upgrade from A3 working without issues. Later I've reinstalled Windows from scratch. I wanted to do so a longer time and now with DSL the Windows Updates are manageable. So I've done it last weekend as there was no important stuff on TV the whole weekend. First I needed MP1 TV Server up and running again as I'm recording daily. Yesterday I've installed MP2 Server again. The installation itself was easy. Fresh Windows 7 Ultimate x64 with all recent Updates until yesterday. So far so good.
    But the reimport of my collection isn't working quite well. See:
    https://forum.team-mediaportal.com/threads/mp2-thumbnail-generation-is-painful-slow.122773/
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    66
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    If you launched the installer with the MP2-Setup-Logging.bat it would have created an MP2-Setup.log file in the same location you ran the bat file from.
    That would be the log file @MJGraf is looking for.

    As for the Slow Import, I have mentioned this before and suggested a Basic Scan on Shares Import.
    Currently the last ones I did produced
    FanArt Folder - 34.6MB - 428 Files
    TheMovieDB Folder - 1.46GB - 3,955 files, 1,764 folders

    Depending on where you have your Paths setup to be stored and the speed of that drive, will depend on some of the speed..... Over all, this is one of the biggest issues with imports on a new system. Try doing 3 or 4 clean install tests.... That's a Ton of data and drive activity

    Stock Location for these folders...
    C:\ProgramData\Team MediaPortal\MP2-Server
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @MJGraf, what do you think, would it be ok for an interim version to use "locking=normal" instead of "exclusive"? If I read recent posts correctly, there is not so much performance difference, but it would be a workaround until installer custom action is reworked.
    Also we could query database using external tools while server is running.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Absolutely!
    But I think it is not only the InitializationCommand. We have to do two things:

    In SQLiteSettings just delete the part about locking_mode (normal is standard) so that it looks like:
    private const string DEFAULT_INITIALIZATION_COMMAND = "PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;";

    And in SQliteDatabase's Constructor comment out the following:
    connBuilder.JournalMode = SQLiteJournalModeEnum.Off;
    using (var connection = new SQLiteConnection(connBuilder.ToString()))
    {
    connection.Open();
    using (var command = new SQLiteCommand("PRAGMA locking_mode=EXCLUSIVE;", connection))
    command.ExecuteNonQuery();
    connection.Close();
    }
    The latter is a workaround to avoid storing the shared memory used for different connections from different processes to disk in a SHM-File, since this is not necessary in exclusive mode. But as you see it also opens an exclusive connection independent from the InitializationCommand. Just commenting it out should do the trick.

    If you want to do a new build, please feel free to make the amendments. Have to do some real live work today and am not sure, whether I find the time to do this myself today...

    Michael
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Just a short side note. Maybe someone asks or answers this already but then I've missed it... In the "ProgramData\Team MediaPortal\MP2-Server\" folder we have a sub- folder named "Database" that is empty always. Shouldn't the "Datastore.s3db" and the "Datastore.s3db-wal" files reside inside this "Database" folder?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.

    I don't have that folder - just checked...?!?
    Maybe because you never use the installer... ;)

    It was always there from my very first try with MP2 up to now. But afair it was never used, no matter if SQLCE, MySQL and now SQLite was the DB provider. But I think we should use it when we have it.
    Zwischenablage-1.jpg
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Maybe because you never use the installer
    Good point :D
    Does that mean the installer creates it? Could you test by stopping MP2 Server, rename your ProgramData\Team MediaPortal\MP2-Server\ folder to e.g. ProgramData\Team MediaPortal\MP2-Server-sik and restarting the MP2 Server whether it is then also created? (You can then Stop MP2 Server again, delete then new ProgramData\Team MediaPortal\MP2-Server\ directory, rename the ProgramData\Team MediaPortal\MP2-Server-sik into ProgramData\Team MediaPortal\MP2-Server\ and restart the MP2 Server and have all your settings and the database back...)
    Thanks!
     

    Users who are viewing this thread

    Top Bottom