egd;227554 Wrote:
> If it would be useful I can upgrade the NAS slimserver module to the
> latest version which should allow me to access the underlying database
> via either my Linux or Windows desktops - this way I will be able to
> physically see what is happening in the tables. I just hope (I cannot
> remember) that installing a newer module does not require another full
> library rescan.
If you have a 6.5.* SlimServer, that should be enough. You can use the
Database Query plugin if you like to look at the SlimServer database
contents.
egd;227567 Wrote:
> The Custom Tag scan on the NAS is a spectacular failure, there is entry
> after entry along the lines of the following:
>
> >
Code:
--------------------
> > Database error: Lost connection to MySQL server during query
> 2007-09-17 22:17:17.4708 Database error: MySQL server has gone away
> <SNIP>
> 2007-09-17 22:17:39.4794 Database error: MySQL server has gone away
> 2007-09-17 22:17:50.7732 Database error: Lost connection to MySQL server
during query
> <SNIP>
> 2007-09-17 22:43:42.6382 Database error: MySQL server has gone away
--------------------
> >
>
> Where did MySQL server go and who gave it permission to go anywhere!
>
> I'll have to upgrade the slimserver module and see if that changes
> anything.
This could be that some SQL statements takes to much CPU usage and time
for some reason. Or a lot of memory which probably could cause problems
on a NAS box.
If I remember you had some problems some days ago where the first
scanning with Custom Scan worked, but when you scanned the second time
it just hanged. The explanation to this could be that when the Custom
Scan tables are empty the scanning succeeds, but when a Custom Scan is
performed when the tables already has been filled with data it hangs.
The steps the Custom Scan plugin passes through a scanning with pushing
"Scan All" are the following:
1. Refresh current scanning data
2. Delete the Custom Tag data
3. Delete the Mixed Tag data
4. Scan all tracks with the Custom Tag scanning module
5. Copy the Custom Tag and SlimServer data with the Mixed Tag scanning
module
The above sequence also happens if the Custom Scan scanning is trigged
by a standard SlimServer scanning.
If you have enabled the debug messages parameter in the Custom Scan
section of "Server Settings/Plugins" you should see some messages in
the SlimServer log that starts with "Custom Scan: ...."
If you perform a "Clear All" operation the following steps are
executed:
1. Drop/Delete all Custom Scan tables
2. Recreate the Custom Scan tables without data
The operations that can take time are:
- The refresh operation in the beginning of the scanning can take time
and memory if the Custom Scan tables contains a lot of data prior to
the scanning.
- The delete operation that deletes Custom Tag and Mixed Tag data can
take some time, but they have been divided so it just deletes 1000
records at a time and repeat the process until all necessary rows has
been deleted.
Here are some ideas when you get SlimServer and MySQL up and running
again:
1.
In the Custom Scan section of "Server Settings/Plugin", disabled the
"Automatic rescan" and "Startup refresh" options. This will make sure
scanning with the Custom Scan plugin aren't performed unless you
actually press the scan link in the Custom Scan interface.
2.
Make sure you have enabled the debugging parameter in the "Custom Scan"
section of "Server Settings/Plugins" so we get debug messages from
Custom Scan.
3.
Try to perform a "Clear All" before you like the "Scan" button of
Custom Tag. This way the refresh and delete steps in the scanning
process shouldn't take any time. After the scanning finished, check if
the STYLE, MODE, THEMES tags has been scanned. To do this, you can use
the Database Query plugin with the free form query and the following SQL
statement:
Code:
--------------------
select module,attr,count(*) from customscan_track_attributes group by
module,attr
--------------------
Note! This statement is not exactly the same as the one I mentioned a
few days back.
4.
If step 3 succeeds, try to click the "Scan" button beside the "Custom
Tag" module again. This time look in the SlimServer log and see how
long time the first step takes.
You should see some debug entries like:
"Custom Scan: Starting to .... update ... based on ..."
"Custom Scan: Finished updating ... "
If it seems to hang more than a few minutes between the Starting and
Finished row on any steps I like to know which one.
5.
If step 4 succeeds, try to perform a scanning with the Mixed Tag
scanning module. I suspect the scanning might be fast the first time
and a bit slower the second time. So when you run it the second time it
would be good if you looked at the debug entries according to step 4
above to see which one that takes time. If it succeeds you might wanna
look at the database with the Database Query plugin again with the
statement mentioned in step 3 to see that you have the STYLE, MOOD,
THEME tags in the database for the mixedtag module.
6.
If step 5 succeeds, you basically has a working setup. In this case you
can enable the automatic rescan and startup refresh options you disabled
in step 1 and also turn of the debug logging.
At last a little tip.
I'm not sure how the NAS SlimServer installation is setup, but on a
normal situation the SlimServer database is stored in the Cache/MySQL
directory. If you take a backup copy of this directory, you can always
return to that state by shutting down SlimServer and restoring the
copy. This way you don't have to risk of having to perform a SlimServer
rescan.
I suspect the problem on the NAS box is the refresh or delete steps and
that it is related to the amount of tracks. It probably works correctly
for an equally large library on a standard PC, but the memory and
performance of the NAS might be a problem for the delete and refresh
operations. If this is the case it might be possible for me to divide
these into smaller statements and execute them several times instead,
but before I do that I would like to know which step it hangs on.
When I tested this myself, I've tried it with a 40000 track library and
then the refresh and delete could take a minute or two on a regular PC.
My experience is that it is the delete that takes most time on a
regular PC, but this this might be different on a NAS which have less
memory.
--
erland
Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan, Custom Skip, Multi Library and Database Query plugins'
(http://wiki.erland.homeip.net/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=38256
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins