• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

RadioDJ Library Tools

Started by Valdis, July 22, 2016, 07:45:30 AM

dstro

Actually, you gave me enough info to figure it out...Thanks! :) (Locate the plugin, copy the DLL and reboot)  I installed Scott Studios and NexGen for a combined 12 years so I have a little automation experience.   I'm setting up an internet only streaming and RadioDJ is the PERFECT solution!

MuppetLabs

Get the error Database not found when running the plugin, wonder if this is because i run MySQL off of a NAS Drive?

Valdis

That should not be possible because the plugin is using RadioDJ settings and code to work with database.
Could you please post the exact error you see?
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

MuppetLabs

in the windows event system viewer get the following

Incorrect key file for table '/tmp/#sql_1299_0.MYI'; try to repair it (SELECT subcategory.ID AS ID,
               category.name AS CategoryName,
               subcategory.name AS SubcategoryName,
               SUM(CASE WHEN songs.enabled = 1 THEN 1 ELSE 0 END) AS TracksInCategory,
               COUNT(DISTINCT songs.artist) AS UniqueArtists,
               COUNT(DISTINCT songs.title) AS UniqueTitles,
               SUM(CASE WHEN songs.enabled <> 1 THEN 1 ELSE 0 END) AS DisabledTracks,
SUM(CASE WHEN (
                  songs.enabled = 1
                  AND TIMESTAMPDIFF(MINUTE, `date_played`, NOW()) > 60
                  AND TIMESTAMPDIFF(MINUTE, `artist_played`, NOW()) > 60)
                  THEN 1 ELSE 0 END) AS SelectableTracks,
SEC_TO_TIME( ROUND(SUM(COALESCE( songs.duration, 0 ))) ) AS TotalDuration,
               SEC_TO_TIME( ROUND(AVG(COALESCE( songs.duration, 0 ))) ) AS AvgDuration
               FROM `subcategory`
               LEFT JOIN `songs` ON(subcategory.ID = songs.id_subcat)
               LEFT JOIN `category` ON(category.ID = subcategory.parentid)
WHERE songs.song_type = 0 OR songs.song_type IS NULL
GROUP BY subcategory.ID, songs.id_subcat
ORDER BY TracksInCategory DESC, SelectableTracks DESC;
)




Valdis

Quote from: MuppetLabs on September 06, 2016, 03:41:44 PM
in the windows event system viewer get the following

Incorrect key file for table '/tmp/#sql_1299_0.MYI'; try to repair it (...)


That MySQL error is caused by not having enough free space in /tmp/ directory. Sometimes MySQL creates a temporary table for queries with multi-table JOIN statements with ORDER BY clauses and the table has to be stored in a temporary directory.
Your NAS must be running some flavour of Linux. On most Linux systems /tmp/ is on its own partition and does not have enough space, especially if it is an embedded, resource-constrained system. If you have SSH or TELNET access to the NAS, run a console command df -h /tmp to see how much space is allocated to the /tmp/ directory.

Here is what the command shows on my router:

root@foobar:/# df -h /tmp
Filesystem                Size      Used Available Use% Mounted on
tmpfs                     7.0M    220.0K      6.8M   3% /tmp

Needless to say, 7MB is not nearly enough for MySQL temporary tables but it is a router, not a NAS.

To fix the issue, you have following options:

  • Change /tmp partition to have more space, which might not be possible without root access
  • Change MySQL temporary directory settings as tmpdir option in my.cnf file or mysqld --tmpdir command line argument to /var/tmp or other location with plenty of free space

My MariaDB 10.0.21 installation on Windows does not create any temporary tables for queries performed by the plugin. However, that depends on MySQL/MariaDB version, configuration and table sizes.

What is the MySQL version on your NAS?
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

MuppetLabs

My Sql version is 5.0.70

this is what i get when running the command

root@LS-QVLF68:~# df -h /tmp
Filesystem                Size      Used Available Use% Mounted on
/dev/ram1                15.0M    660.0k     14.4M   4% /mnt/ram

so it looks as if its running on the ram

I'll look at adding another path for the MySQL tmp directory somewhere else on the NAS


Thanks for your help Valdis

Valdis

Quote from: MuppetLabs on September 07, 2016, 08:48:18 AM
My Sql version is 5.0.70

this is what i get when running the command

root@LS-QVLF68:~# df -h /tmp
Filesystem                Size      Used Available Use% Mounted on
/dev/ram1                15.0M    660.0k     14.4M   4% /mnt/ram

so it looks as if its running on the ram

I'll look at adding another path for the MySQL tmp directory somewhere else on the NAS


Thanks for your help Valdis

Yes, 15MB might not be enough for larger temporary MySQL tables and there might be other temporary files in /tmp/ directory.

MySQL version 5.0.70 was released on 2008-09-27. Eight years is like a century in terms of software development.
Judging by the hostname "LS-QVLF68" your NAS must be a Buffalo LinkStation and you have root access. You should really consider upgrading MySQL or, even better, replace MySQL with MariaDB if there is a package for your NAS. Buffalo NAS-Central Forums seems like the right place to look for more info or help. There is a topic describing the exact same issue here.
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

MuppetLabs

i'm just figuring out what i have just broken in MySQL and then try and update

rkriggs

this is the first radiodj plugin i have downloaded. i dont know where to put it or run it. can someone please help?
Randy k Riggs