Bug 17498 - AutoRescan causes server outage
: AutoRescan causes server outage
Status: UNCONFIRMED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.6.0
: PC RedHat Linux
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-24 10:51 UTC by Johan Vromans
Modified: 2011-09-02 04:12 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Vromans 2011-08-24 10:51:57 UTC
I'm running SBS 7.6.1 r33148  on Fedora 14.

Three times per day the server performs an AutoRescan. While the scan takes place, the SBS does not respond. The SqueezeBox display "connection lost, retry...". In my case this lasts about 20 minutes.

In contrast, during the daily scheduled rescan, SBS stays responsive. Difference is that the latter is performed by the scanner program while the former is performed by the server itself.

Q1: Why the AUtoRescan?
Q2: How to avoid the server outage?
Comment 1 Johan Vromans 2011-08-25 23:22:41 UTC
While the server is scanning it consumes 99% of CPU. No excessive memory usage.
Comment 2 Johan Vromans 2011-09-02 04:12:10 UTC
Well, I found out some things...

First of all, SBS 7.6 wants to track changes using inotify for directories *AND* files. In my particular case I had to raise /proc/sys/fs/inotify/max_user_watches from 8,196 (default) to a value around 50,000 !!!

But my main problem is that the file hierarchy that SBS uses is a symlinked copy of my actual music collection. Three times per day I throw away the symlinks and recreate the file hierarchy. As a result SBS instantaneously starts processing thousands and thousands of inotify requests, bringing the server down to its knees. Music stops playing and the SB looses its connection to the server. This can take up to 30 minutes!

I guess noone else is having this problem since it depends on the way I have my server setup.

I disabled autorescan in the server configuration and all seems to be going well now.

Nevertheless I think that SBS should not handle inotify requests in its main thread.