[confirm] DataBase Size Error (1 Viewer)

guytpetj

MP Donator
  • Premium Supporter
  • March 24, 2005
    424
    57
    60
    USA
    Home Country
    United States of America United States of America
    I think I've hit a snag with MP2.

    After setting up my shares for pictures, music, movies and tvseries my database got quite big (256MB).
    Now when I start MP2 it does no longer shows my files when I browse or use the filter buttons to look at my media.

    I loaded approx.
    • 56000 pictures
    • 22000 songs
    • 14000 episodes (tv series)
    • 550 movies
    The server log has some entries about the database size exceeding the limit.
     

    guytpetj

    MP Donator
  • Premium Supporter
  • March 24, 2005
    424
    57
    60
    USA
    Home Country
    United States of America United States of America
    Additional information:

    Looking at the database using the M$ Compactview, getting same error.

    Capture.PNG
     

    guytpetj

    MP Donator
  • Premium Supporter
  • March 24, 2005
    424
    57
    60
    USA
    Home Country
    United States of America United States of America
    Aditional Information:

    I compacted the database using M$ Compactview. It made the database just a little smaller, but below the error size and everything is working again.

    We defenately need a larger limit on the dtabase then 256MB.

    Capture2.PNG
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    Yesterday, Smeulf found a resource in the internet which describes the problem: http://blogs.msdn.com/b/sqlserverco...atabase-size-connection-string-parameter.aspx
    guytpetj, do you have a setup where you can compile/run MP2? I.e. do you have checked the sources out and VS 2010 installed? I don't want to make you too much work, so don't bother. We can also give you a precompiled test version, just let us know.

    The problem doesn't seem to be a broken DB, it seems only to be a connection string which restricts the DB size to 256 MB by default. Changing that string should avoid the problem.

    If you can do it yourself, can you please test this: Go to file 'SQLCEDatabase.cs' line 58 and use a connection string like this:
    Code:
    _connectionString = "Data Source='" + databaseFile + "'; Default Lock Timeout=" + LOCK_TIMEOUT + "; Max Buffer Size = " + MAX_BUFFER_SIZE + "; Max Database Size = " + 1024;

    If you're using VS, you also might have to set MediaPortal.Server project as main (startup) project. Then, you can run the server from the IDE. Our Wiki has also some tips about compiling MP2 if you have problems.
    Alternatively, you can compile the server after changing the source file using MSBuild by opening Build/MSBUILD_Rebuild_Release_Server.bat and then run it from the Bin directory.

    Thanks for testing!
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    Smeulf, we can also do another check; can you please try to start your server with an SQLCEDatabase compiled with the connection string I wrote above and use a Max Database Size value which is a bit smaller than your local database? If you can reproduce the error, I would say I'll do two things:
    1) Use a bigger default value for that switch in the connection string
    2) Make that value configurable
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    mmm, "funny" : I can't reproduce the problem with "Max Database Size" = 1 or 10 as my db is 27Mb

    But maybe it just means the max database size can't be less than the default minumum, even if I can't find any KB about that...

    Albert, I would also think about an auto increase of the max database size value. IE if the initial value is 1Gb, and the db is more than 512Mb at server startup, then the Max DB size would grown up to 1.5Gb. It would avoid anyone to forgot to increase the value in the config file or setting.
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Alternatively, you can compile the server after changing the source file using MSBuild by opening Build/MSBUILD_Rebuild_Release_Server.bat and then run it from the Bin directory.

    Thanks for testing!

    Also, I can eventually provide a test version of the plugin with a 1024Mb max database string...
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    Albert, I would also think about an auto increase of the max database size value. IE if the initial value is 1Gb, and the db is more than 512Mb at server startup, then the Max DB size would grown up to 1.5Gb. It would avoid anyone to forgot to increase the value in the config file or setting.
    Good idea. If we have confirmed that the problem is gone with the new setting, I can implement such an auto-increment.
     

    guytpetj

    MP Donator
  • Premium Supporter
  • March 24, 2005
    424
    57
    60
    USA
    Home Country
    United States of America United States of America
    I have not compiled MP2 before, but will download the trunk tonight and give it a go.
    I'll keep you posted
     

    Users who are viewing this thread

    Top Bottom