I have a possible solution to this.
I bought a chromecast and so enabled the DLNA streaming on my MBL.
Previously i had disabled it for the same reasons everyone else complains about. The disk spinning permanately and MBL being very slow for access. I had already disable the mediacrawler program, so it wasn’t that ( update-rc.d -f orion).
Logging in to the MBL through ssh i saw the dlna process was still the culprit, dms_smm at 100%. Previously i had observed this for days/weeks, so it was never going to complete the job it was attempting to do.
With a reason to sort this out i spent some time working out what was happening. Didn’t get to the root cause, although it is probably to do with the number of files on the disk.
But i did come up with a solution.
The DLNA program has a set of configuration files in /usr/local/dlna-access/xml. One of those (excludes.xml) i discovered contains a list of patterns/files/directories that should be ignored for DLNA content (although it could be intermittent on actually obeying this list - possibly because i was runnign things from the command line during debugging).
My MBL has approximately 24,000 files of photos and videos. It also has approximatley 270,000 files from various backups and other things. This is what i found was causing my DLNA scan to never end, or break, not sure which.
Fortunatley for me all those files are under a different directory than the video/photos - but still under the /DataVolume/shares/Public/ directory - which is where the DLNA scans happen.
So adding ‘backups’ to the list of things in exclude.xml i managed to get the dms_smm process to skip those offending files.
added backups to /usr/local/dlna-access/xml/excludes.xml
restart the DLNA server, either from the web interface or the command line with the /etc/init.d/access script.
It may take some time to scan your files, but mine completed within a couple of hours with 24,000 files.
There are other files in the xml config directory. The storage_list.xml looks promising, but depending on which version of DLNA server you have it will be overwriten at start time and the script /usr/local/sbin/listMediaShares.sh will be used to add shares to the storage_list.xml for scanning. I kept it simple and just modded the excludes.xml.
You can count the number of files you have in different directories with:
cd directory
find . -type f -ls | wc -l
In the directory /DataVolume/shares/Public/.nflc_data you will find the SQLlite database that the DLNA server is building. Could be that it just got too big with 1/3million files. Anyway with 24,000 files mine is around 40MBytes.
Hope this of use to others that get similar problems.