MM stuck on "Reading Tracks..." for 10+ minutes

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby RandomAcronym » Wed Feb 03, 2010 6:32 pm

A new DB did not help. :(

right before my music showed up Debug View said this:

[6896] Going to make final callback 5544
[6896] 1440 DB lock finished, took 430.

What should I do with the Debug log?
Sansa Fuse: so good thy stopped makings it.
PC specs:
Win 8 RP 64bit
Core i7-2600K
12GB DDR3
2 1TB drives (not SSD)
AMD Radeon HD 5850
RandomAcronym
 
Posts: 10
Joined: Tue Feb 02, 2010 8:11 pm

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Lowlander » Wed Feb 03, 2010 6:55 pm

As per debug instructions you should send it to support: http://www.mediamonkey.com/support/inde ... &_a=submit
Lowlander
 
Posts: 31720
Joined: Sat Sep 06, 2003 5:53 pm

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Melloware » Mon Feb 22, 2010 1:15 pm

Our MonkeyTunes users are seeing this too. It turns out if you have File Monitor ON we are seeing this behavior but as soon as we turn File Monitor OFF and restart MM loads fine without reading Tracks... problem.

I think what might be happening is the INIT of my script is running SQL Queries and the File Monitor is trying to edit the SQl Lite database underneath it causing a deadlock.

I don't do any UpdateDB commands only read-only SELECTS starting up.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware
 
Posts: 329
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Funkafonik » Tue Feb 23, 2010 8:45 am

Finally some answers about this! My MM also started doing this not long ago and couldn't figure it out...
until this thread mentioning MonkeyTunes that I've bought and installed at around the time my MM started acting up.
I love File Monitor and MonkeyTunes, so hopefully a fix is coming to allow the use of both at the same time!

thx!
Funkafonik
 
Posts: 53
Joined: Fri Feb 13, 2009 12:33 pm

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby nohitter151 » Tue Feb 23, 2010 8:52 am

Funkafonik wrote:Finally some answers about this! My MM also started doing this not long ago and couldn't figure it out...
until this thread mentioning MonkeyTunes that I've bought and installed at around the time my MM started acting up.
I love File Monitor and MonkeyTunes, so hopefully a fix is coming to allow the use of both at the same time!

thx!

Just disable the start up scan. You can still use file monitor, and the problem won't occur.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?
nohitter151
 
Posts: 21458
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Funkafonik » Tue Feb 23, 2010 9:01 am

nohitter151 wrote:
Funkafonik wrote:Finally some answers about this! My MM also started doing this not long ago and couldn't figure it out...
until this thread mentioning MonkeyTunes that I've bought and installed at around the time my MM started acting up.
I love File Monitor and MonkeyTunes, so hopefully a fix is coming to allow the use of both at the same time!

thx!

Just disable the start up scan. You can still use file monitor, and the problem won't occur.


Hmm but like I mentioned in the other thread, I did have it set to Startup Scan OFF...
Funkafonik
 
Posts: 53
Joined: Fri Feb 13, 2009 12:33 pm

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Melloware » Tue Feb 23, 2010 6:04 pm

Funkafonik wrote:Hmm but like I mentioned in the other thread, I did have it set to Startup Scan OFF...


I wonder if I add a line of code in MonkeyTunes that 10 seconds after it starts up to send an SDB.ProcessMessages call because I think by connecting with the Apple Remote which causes the deadlock to magically break and MM start working again.

I don't know what would be causing the deadlock but something surely is. I might add that in the code and have you try it out.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware
 
Posts: 329
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Funkafonik » Wed Feb 24, 2010 8:48 am

Melloware wrote:
Funkafonik wrote:Hmm but like I mentioned in the other thread, I did have it set to Startup Scan OFF...


I wonder if I add a line of code in MonkeyTunes that 10 seconds after it starts up to send an SDB.ProcessMessages call because I think by connecting with the Apple Remote which causes the deadlock to magically break and MM start working again.

I don't know what would be causing the deadlock but something surely is. I might add that in the code and have you try it out.


OK, I've played around some more and as of this morning, even with no signs of File Monitoring, MM keeps hanging on startup so I had to completely remove MonkeyTunes, and now it's all back to normal, MM is back up to full speed. So I'm guessing the problem is with MonkeyTunes itself...

I'll wait for an update before reinstalling it.

thx!
Funkafonik
 
Posts: 53
Joined: Fri Feb 13, 2009 12:33 pm

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Melloware » Wed Feb 24, 2010 12:55 pm

OK I ran in Debug Mode. Here is what is happening. I don't quite understand why but even though my queries have finished MM think they are still runnign which is what is causing this problem I think. I am doing queries using OpenSQL like the documentation says...

http://www.mediamonkey.com/wiki/index.php/ISDBDatabase::OpenSQL

It looks like for about 20 seconds after MM is started these queries look like they are still running.

Code: Select all
8.673s - PID:500 - Closing database.
        8.673s - PID:500 - DB:_Query remained running:_SELECT DISTINCT Albums.ID,Albums.Artist,Albums.Album,Albums.Tracks FROM Albums  ORDER BY Albums.Album
        8.673s - PID:500 - DB:_Query remained running:_SELECT Playlists.IDPlaylist, IFNULL(Playlists.IsAutoPlaylist, 0) IsAutoPlaylist,IFNULL((SELECT A.PlaylistName FROM Playlists A WHERE A.IDPlaylist=Playlists.ParentPlaylist), 'Root') || ' - ' || Playlists.PlaylistName AS NAME, COUNT(PlaylistSongs.IDPlaylistSong) as REC_COUNT FROM Playlists LEFT OUTER JOIN PlaylistSongs ON Playlists.IDPlaylist = PlaylistSongs.IDPlaylist GROUP BY  Playlists.IDPlaylist, IsAutoPlaylist, NAME ORDER BY NAME
        8.673s - PID:500 - DB:_Query remained running:_SELECT Genres.GenreName FROM Genres  ORDER BY Genres.GenreName
        8.673s - PID:500 - DB:_Query remained running:_SELECT DISTINCT Artists.Artist FROM Artists, ArtistsSongs, GenresSongs, Genres WHERE Genres.GenreName = 'Classical' AND Artists.ID=ArtistsSongs.IDArtist AND Artists.Albums != 0 AND ArtistsSongs.IDSong=GenresSongs.IDSong AND Genres.IDGenre = GenresSongs.IDGenre  ORDER BY Artists.Artist


So I am calling queries the way I am supposed to I would assume they close closed properly. I even tried wrapping them in a BeginTransaction and Commit() method even though I am not doing any updates.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware
 
Posts: 329
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Melloware » Wed Feb 24, 2010 2:52 pm

I think I found it!!!!!

So here is what is happening. When I start MonkeyTunes I run some queries to cache for performance. What happens is MediaMonkey thinks those queries are still Open according to my DEBUG Log. MonkeyTunes is a .NET application therefore it handles all object management and cleanup.

So when I run a query like this in .NET...

Code: Select all
SDBDBIterator iterator = (SDBDBIterator)MediaMonkey.Database.OpenSQL( "SELECT DISTINCT TextData FROM AddSongInfo WHERE DataType=200 Order BY TextData");
while (!iterator.EOF) {
   iterator.Next();
}


I though the query was closed. However because .NET uses Garbage Collection the Query is not "closed" in MediaMonkey until the SDBDBIterator is Garbage Collected. So if the queries are open other processes like File Monitor are locked until those queries are released which is why it works after 10+ minutes because the garbage collector finally runs and cleans up the queries.

So to fix it what I do is after my pre-cache queries run I then call
Code: Select all
System.GC.Collect()
to force .NET to Garbage collect and it closes the queries in MediaMonkey.

I tested locally and everything appears to be working. If you want to download our latest version and give it a shot download the version from our website and try again.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware
 
Posts: 329
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Funkafonik » Wed Feb 24, 2010 5:47 pm

Works great so far! Thanks alot for that! :)
Funkafonik
 
Posts: 53
Joined: Fri Feb 13, 2009 12:33 pm

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby nohitter151 » Wed Feb 24, 2010 6:14 pm

Works great for me, MM seems to load up much quicker now.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?
nohitter151
 
Posts: 21458
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby Melloware » Wed Feb 24, 2010 6:19 pm

I am relieved that we got this solved. This was a tricky one to diagnose and track down.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware
 
Posts: 329
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby matthewschenker » Mon Mar 15, 2010 1:34 pm

Hello,
I am having the same problem. When MediaMonkey starts up, it is stuck in the "Reading Tracks..." mode apparently forever. I've let it run for over 30 minutes before closing the program. The first time I ran the software, it scanned my library and added all the music folders and files with no problem. But the second time I ran MediaMonkey, the hangups began.

I've tried most of what was suggested here. But I still have the problem.

One of the things I can't figure out is how to disable the start-up scan. Where do I do that?

The other things is to remove monkeyTunes. how do I do that?

I really like Mediamonkey's options and design, and would like to use it! Please help!

Thanks,
Matthew
matthewschenker
 

Re: MM stuck on "Reading Tracks..." for 10+ minutes

Postby matthewschenker » Mon Mar 15, 2010 1:38 pm

Hello,
I am having the same problem. When MediaMonkey starts up, it is stuck in the "Reading Tracks..." mode apparently forever. I've let it run for over 30 minutes before closing the program. The first time I ran the software, it scanned my library and added all the music folders and files with no problem. But the second time I ran MediaMonkey, the hangups began.

I've tried most of what was suggested here. But I still have the problem.

One of the things I can't figure out is how to disable the start-up scan. Where do I do that?

The other things is to remove monkeyTunes. how do I do that?

I really like Mediamonkey's options and design, and would like to use it! Please help!

Thanks,
Matthew
matthewschenker
 
Posts: 13
Joined: Mon Mar 15, 2010 1:36 pm

PreviousNext

Return to Need Help? (mmw)

Who is online

Users browsing this forum: Bing [Bot] and 25 guests