PDA

View Full Version : Occasional long pauses during playback - mysqld.exe culprit?



Martin_Edney
2010-08-22, 06:12
Here's my set up
- Windows XP Professional SP3
- Squeezebox Server Version: 7.5.1 - r30836
- 2 Squeezebox players in different rooms (1 x Classic v.3 and 1 x Duet)
- Wired connection from PC to broadband router, wireless from router to Squeezebox players

Occasionally (once or twice every few hours) playback stops in the middle of a song, for something like 30 seconds to 1 minute or more, and then picks up again where it left off. This happens equally with either of my players.

This has been the case for a long time, during which time I've updated the Squeezebox Server software and player firmware a few times. I've dug around for a solution but never found one, and until now I've just put up with it.

Today when this happened, I quickly went to the computer and used the Windows Task Manager to see what was happening on the computer - I could hear that there was a lot of disk activity going on, and I noticed that mysqld.exe was consuming something like 20% CPU. As I watched, I heard the Squeezebox Duet player resume playback, and I noticed that mysqld.exe dropped down to 1% CPU at the same time.

So I wonder whether the intermittent pauses in playback that I'm suffering are related to mysqld.exe getting into a tangle for some reason?

Any thoughts or suggestions please?

Thanks,

Martin

Mnyb
2010-08-22, 06:26
what kind of settings for automatic rescan ?

Did you schedule squeezeboxserver to scan your music ? (rescan timer in advanced settings)

Or did you get new music and manually started the scan ?

Since > 7.4 ? scan always breaks playback for me.

But you are on 7.5.1 I don't think the "Automatically detect changes" function is implemented yet in that versions ? (7.6 user can disable it under advanced performance)

Martin_Edney
2010-08-22, 07:56
what kind of settings for automatic rescan ?

Did you schedule squeezeboxserver to scan your music ? (rescan timer in advanced settings)

Or did you get new music and manually started the scan ?

Since > 7.4 ? scan always breaks playback for me.

But you are on 7.5.1 I don't think the "Automatically detect changes" function is implemented yet in that versions ? (7.6 user can disable it under advanced performance)

Thanks for your reply.

My rescan timer setting is set to automatically rescan at 9.00am, and to look for new and changed music, but this problem occurred later (probably around 12.30pm).

I normally kick off a manual rescan when I need to, usually looking for new and changed music, and this doesn't upset playback.

Any more ideas anyone please?

Thanks,

Martin

Mnyb
2010-08-22, 10:12
Are you using the "browse music folder" instead of artist's albums genres etc ?

If you find a new Album during BMF it's scanned and added, heck i think some kind of check including is going a son as you hit a bunch of files with bmf .

Do you get problems during normal scans ? re AV software , no scanner log's filled with "..can't write to file bla bla.myd" or similar ?

Do you have an Antivirus scan scan sheduled ?

AV software should have *MYD and *.MYI files excluded (these are often tempfiles created by MySQL).
Older MSE version bugs' so it did not honor those settings.

No backups going on in the background ?

Sorry out of ideas, i ditched Norton for such reason 2 years ago when I was using windows. My win knowledge is outdated.

atrocity
2010-08-22, 11:45
Occasionally (once or twice every few hours) playback stops in the middle of a song, for something like 30 seconds to 1 minute or more, and then picks up again where it left off.

I've been having trouble with this as well, both with a dedicated Ubuntu server and with a different server running virtualized Ubuntu against the same library under Vista. On weekends, I use Dynamic Playlists, Custom Skip and TrackStat to play "Never Played Albums" all night long with a fairly large list of genres to skip. At several points during the night I was having trouble with random pauses and, more recently, trouble with an album playing, stopping at the end and not moving on to another album.

For various reasons too boring to explain, I move some of my directories around between two NASes, which of course screws up the TrackStat data. The new bit of fun where a new album wouldn't get added to the list got me to suspect that this was part of the problem.

So yesterday I used the virtualized-under-Vista server as a test and I:

1. Imported my TrackStat backup from the main Linux server (the one I use most commonly).

2. Did a complete clear and rescan of the database

3. Went into TrackStat settings and selected "Delete unused statistic", which wipes out TrackStat data for files that no longer exist.

I never woke up to silence during the night and when I woke up for real this morning I still had music...it's only been one night, so I can't swear that I fixed the problem, but I *suspect* that my TrackStat data was sufficiently out of touch with reality to cause a problem. My last trackstat backup file prior to the cleanup was 30,686,088 megabytes. The file that was created last night was down to 28,756,471 megabytes, so a couple megs of obsolescence got dumped.

Of course, I could be completely insane and Erland doesn't know whether to laugh or cry at my ignorance.

lrossouw
2010-08-22, 19:56
Yes trackstat and those dynamic playlists seem to be more prone to causing the type of thing mentioned.

If you have large collection running on a server may be useful to try the tweaked mysql settings that give the mysql process more memory etc. Seems to improve things for me: http://forums.slimdevices.com/showthread.php?t=70371

Dura
2010-08-23, 01:45
MySQL gave me problems when I was using MS Security Essentials as AV-program.
Apparently the two don't go together. I changed Esentials for Avira and things were fast and smooth from then on.

Martin_Edney
2010-08-23, 06:15
Are you using the "browse music folder" instead of artist's albums genres etc ?

Thanks for your help.

No, I most often listen via random mix, though when I wrote yesterday I'd chosen to listen to an album by going via artist, and the problem occurred after the album had been playing for 30 minutes or so.


Do you get problems during normal scans ? re AV software , no scanner log's filled with "..can't write to file bla bla.myd" or similar ?

Not as far as I know, but I'll check the scanner logs as you suggest.


Do you have an Antivirus scan scan sheduled ?


Yes, but it's scheduled for 7.30pm, and this problem happened around midday.


AV software should have *MYD and *.MYI files excluded (these are often tempfiles created by MySQL).

Good suggestion, I'll try this.


Older MSE version bugs' so it did not honor those settings.


Sorry, what's MSE? I use AVG anti-virus.

No backups going on in the background ?


No, I don't have anything automated, but thanks for suggesting it.


Sorry out of ideas, i ditched Norton for such reason 2 years ago when I was using windows. My win knowledge is outdated.

OK, thanks for trying. I'll look in the AVG log as you've suggested, and make sure *MYD and *.MYI are excluded from anti-virus activity.

davidfox2116
2010-08-24, 09:58
I've been having the same problem intermittently. I'm running SB Server on a Vortexbox Appliance (Fedora Linux) with Custom Browse and Custom Scan activated. I have about 2500 CD's loaded already but I'm very much still in "add" mode. I believe the problem is that rescans are triggered by new additions and I probably don't have the proper override settings to avoid them. Custom Scan seems to disable the generic scan settings. I need to learn more about Custom Scan to find out if such an override is possible. I'm not sure that it is.

What I've found works best for me is to avoid ripping CD's for at least an hour prior to a listening session. I also run overnight "clear library and rescan everything" about once a week. The problem still appears occasionally but far less frequently. It is annoying and I would prefer greater control over rescans.

P.S. Martin - I think we know each other - at least if you're the same Martin Edney I knew from NYC. I just sent you a friend request.

bburroughs
2010-08-25, 14:50
I, too, have been having this problem. I'm also running on a Vortexbox appliance, with Custom Scan and Custom Browse enabled. It stopped happening for several weeks, and then started up again a few weeks ago. The couple of times that I've managed to log in while the problem was happening, mysql was sucking up most of the CPU. When exactly is mysql supposed to be active? Only during a scan? Unless I'm missing something, I don't think I have any automatic scanning enabled.

Martin_Edney
2010-08-28, 10:20
AV software should have *MYD and *.MYI files excluded (these are often tempfiles created by MySQL).
Older MSE version bugs' so it did not honor those settings.

Thanks, I'm using AVG which by default is only set to scan a defined list of infectable files (and files with no file extension). *.myd and *.myi aren't in the list of files that it will scan, so I don't think this is the problem.

slate
2010-08-28, 10:41
It could still be rescanning. I had the problem were it would just do repeated rescanning ... like it never ended.
Look in your server and scanner logfiles.
Or newt time it happens fire up taskmanager and have a look if there are processes that eat the CPU

toby10
2010-08-29, 05:15
Thanks, I'm using AVG which by default is only set to scan a defined list of infectable files (and files with no file extension). *.myd and *.myi aren't in the list of files that it will scan, so I don't think this is the problem.

I'd still suggest suspending AVG then starting SBS and try scanning again.
I use AVG without issue and I believe I only had to give it the squeezebox.exe exception, but updates to anti-virus installs can cause new exception issues.
Who knows, but you need to rule out anti-virus and firewall issues to move forward in your diagnosis.

Martin_Edney
2010-08-29, 09:26
So yesterday I used the virtualized-under-Vista server as a test and I:

1. Imported my TrackStat backup from the main Linux server (the one I use most commonly).

2. Did a complete clear and rescan of the database

3. Went into TrackStat settings and selected "Delete unused statistic", which wipes out TrackStat data for files that no longer exist.


Thanks for this advice. I've tried doing step 3 alone, but I found that even after leaving it running overnight the Trackstat web page of the Squeezebox settings was still showing as loading, and looking at Windows Task Manager, I could see that mysqld.exe was running, using about 10% CPU permanently. When I tried to do anything with the Squeezebox, including loading the web interface, it failed (did not load / could not connect), so it looks to me as though "Delete unused statistic" locked up MySQL or locked up Squeezebox Server.

So I'm not convinced that the "Delete unused statistic" operation completed.

Today I've tried steps 2 and 3, and again found that 6 hours later the Trackstat web page of the Squeezebox settings was still showing as loading, and looking at Windows Task Manager, I could see that mysqld.exe was running, using about 5-10% CPU permanently.

So I'm starting to think that there may be a problem with my Trackstat plugin, or its data. Whether this is what caused the original problem is not clear. Any ideas please?

Martin_Edney
2010-08-29, 09:29
Or newt time it happens fire up taskmanager and have a look if there are processes that eat the CPU

Thanks - I already did this - see my original post, where I wrote:


Today when this [a long pause in playback] happened, I quickly went to the computer and used the Windows Task Manager to see what was happening on the computer - I could hear that there was a lot of disk activity going on, and I noticed that mysqld.exe was consuming something like 20% CPU. As I watched, I heard the Squeezebox Duet player resume playback, and I noticed that mysqld.exe dropped down to 1% CPU at the same time.

atrocity
2010-08-31, 17:31
So I'm starting to think that there may be a problem with my Trackstat plugin, or its data. Whether this is what caused the original problem is not clear. Any ideas please?

Try one of the newer betas that uses SQLite? (Sorry, that's probably not very helpful!)