Page 1 of 1
Slow/Not refreshing Library

Posted:
Tue Nov 27, 2012 8:16 am
by asebastian
Hi, I've reorganised my folder structure, and need to rebuild the Serviio catalog database.
I've used the console to do a "Force Refresh", however the process is extremely slow, and seems to stop after a certain number of files are cataloged. Therefore quite a few folders are not being displayed on my TV when connecting to Serviio using the media interface.
Is there a way for me to get this going properly? Perhaps should I be deleting the Serviio catalog databases and force a refresh? If so, are the files in the Serviio\db folder or elsewhere?
Please help. Thanks.
PS..Using Serviio v 0.6.2 on QNAP 419P II.
Re: Slow/Not refreshing Library

Posted:
Tue Nov 27, 2012 12:47 pm
by zip
I fit's stuck on a particular file try to remove that file temporarily to see if it helps.
Re: Slow/Not refreshing Library

Posted:
Tue Nov 27, 2012 9:41 pm
by asebastian
Hi,
Not stuck on any one file, just seems random as it's reading files in the folders. It does about 400-450 files, then just stops. Sometimes when I do a "force refresh" it continues for some more files slowly, then stops again.
I'm wondering if it's just a slow process on the NAS, or that there are potentially a large number of files (due to folder restructuring) that may be causing it (ie hits some internal limit in the code?)
Re: Slow/Not refreshing Library

Posted:
Wed Nov 28, 2012 12:28 pm
by zip
There is no limit on the code.... are these images? If yes you might be hitting memory restrictions.
Re: Slow/Not refreshing Library

Posted:
Wed Nov 28, 2012 9:27 pm
by asebastian
Not image files, mostly .mp4, a few .mkv and .avi files only. They are not big files, about 200MB each only.
I have 26 folders A-Z, each with perhaps 4-15 sub-folders. Each of them have up to 15 files.
I created a new top level folder yesterday and started moving the A-Z folders one at a time. A worked perfectly, B stopped refreshing after 8 sub-folders.
Individual files added to shared folders other than the A-Z are refreshed correctly.
I've attached the derby.log and serviio.log, not sure if you can assist to see if there is anything in there that shows a clue as to why the refresh doesn't work.
Also, do you think I should try (a) a reinstall of serviio on the NAS or (b) delete the db files and let the system re-catalog all the files in the shared folders?
Thanks
Re: Slow/Not refreshing Library

Posted:
Wed Nov 28, 2012 10:13 pm
by csholmq
Enable DEBUG logging and repost the serviio log.
Re: Slow/Not refreshing Library

Posted:
Wed Nov 28, 2012 10:48 pm
by asebastian
Restarted the server, added 1 new folder with 4 sub-folders and some files, and re-attached the serviio log file.
The shared folder is called /share/Multimedia/TV and the folder structure underneath is:
/TV-A
../Show1
../Show2
/TV-B
../Show3
../Show4
/TV-C
etc
I've also run diagnostics and checkfile on the NAS just to ensure there are no HD errors on the hardware too.
Re: Slow/Not refreshing Library

Posted:
Wed Nov 28, 2012 10:58 pm
by csholmq
Not much in that log file. Would need to see some more.
However,
- Code:
org.serviio.db.dao.PersistenceException: Cannot read file path for Folder 273
could be the issue. Do you have any special characters in your folder names?
Re: Slow/Not refreshing Library

Posted:
Thu Nov 29, 2012 6:04 am
by asebastian
No special characters, only alpha, numbers, -, ', and ( ) only. All of these files were correctly catalogued in the library prior to my folder restructure.
The point where it stops also seem quite random, ie it has refreshed some sub-folders, and then only some files within the sub-folders.
I'm wondering if it's a corrupted database. if so, can I delete the database files and expect an automatic rebuild of all my media files in all my shared folders from scratch?
Can you please confirm the steps to do this, ie can I delete all the .dat files in the serviio/library/db/seg0 directory or is there something more that I have to do?
Re: Slow/Not refreshing Library

Posted:
Thu Nov 29, 2012 8:15 am
by csholmq
Sure. Delete the db-folder in ./library. Better yet, just rename it to db.bak and you're safe.
Re: Slow/Not refreshing Library

Posted:
Thu Nov 29, 2012 8:29 am
by asebastian
Thanks, will give it a go Friday night, I assume it will be a long slow process and will let it run over the weekend.
Re: Slow/Not refreshing Library

Posted:
Sun Dec 02, 2012 9:56 pm
by asebastian
OK, my problem is now fixed.
I deleted the database files as mentioned above, and got some PHP errors in the Web UI. Re-installation of ver 0.6.2 didn't make a difference, so I took the opportunity to upgrade to ver 1.0.1 b9 after completely removing the previous version.
Everything is now back to normal after a rebuild time of about 18 hours for my entire collection of files (about 3GB).
Thanks to those who responded to my queries here and in the QNAP forum.