Airtime removed a scheduled item from the cache dir, then played the previous file again
  • We have a problem with the scheduled playout, where an ident that had previously been played half an hour ago was deleted from /var/tmp/airtime/pypo/cache/scheduler/, but was not copied again to the folder for another scheduled playout because it was already there when Airtime last attempted the copy. Therefore the file was not played, and Liquidsoap complained about a "Nonexistent file or ill-formed URI". At this point, there should have been silence, as that file that couldn't be played but instead, Airtime started playing the previous show AGAIN, from the start. The file that had disappeared was a short ident, so we ended up with the same show playing back to back. Therefore the show scheduled to follow the ident did not get played either, although it existed in the cache. When the (unintentionally) repeated show finished, the following show played out (late) and then we had a couple of live shows. Everything was back on track after this, but it was a mess whilst this was going on.

    There appear to be at least 2 bugs here -
    1) the cache_cleanup function in pypofetch.py is deleting files in the cache that are yet to be played out (presumably because they have already been played out) but somehow not always accounting for future scheduling.
    2) Liquidsoap is freaking out and playing out the previous show again, possibly caused by the unexpected removal of a requested item by the previous mentioned function.

    Has anyone else experienced these issues? Is there a solution to this? (Fix or workaround)

    We are using Debian 7.9 and Airtime 2.5.1-6 from the repos, and the relevant logs are attached. The first error happens at 20:00.

    James
  • 5 Comments sorted by
  • I have a similar problem.
    The DJs supply the programs by FTP o Dropbox, then I overwrite the files in the server... sometimes airtime plays a file THAT IT'S ACTUALLY DELETED. I don't know how to repair that, anybody knos how to clear the cache or something?
  • Sounds like server caching to me. If you have VARNISH cache (or similar) enabled - switch it off and reboot.
    Just an idea..
    Post edited by John Chewter at 2016-09-08 15:10:26
    No longer using Airtime or Libretime.
  • It is strange, because I don't have any caching software on my server.
    I use Cloudflare DNS, but in the radio server it's bypassed.

    I will try setting the cache hours in the configuration file to 0.
    Post edited by profesorgame at 2016-09-09 04:04:58
  • I think that the issue might be a bug that has been around for a while that is manifested somehow as follows:

    1) enter a show in the calendar
    2) populate it with content
    3) delete the show / delete the content
    4) create new show / add new content

    somewhere in Airtime the old content is still lurking. I seen a number of posts about this but no solutions. I need to go through the DB carefully and confimr if this was the cause, but has this issue been resolved?

    Any ideas for a solution?
  • try make sure you have Airtime version 2.5.1.6

    your cache directory is found by this
    ls -l /var/tmp/airtime/pypo/cache/scheduler/

    if nothing is schedule
    you should see this
    ls -l /var/tmp/airtime/pypo/cache/scheduler/
    total 0

    if you see something like this

    ls -l /var/tmp/airtime/pypo/cache/scheduler/
    total 19552
    -r--r--r-- 1 root root 995344 Sep 13 12:10 1194.mp3
    -r--r--r-- 1 root root 85996 Sep 13 12:10 1363.mp3
    -r--r--r-- 1 root root 113164 Sep 13 12:10 236.mp3
    -r--r--r-- 1 root root 190904 Sep 13 12:10 237.mp3
    -r--r--r-- 1 root root 158721 Sep 13 12:10 238.mp3
    -r--r--r-- 1 root root 144326 Sep 13 12:10 240.mp3
    -r--r--r-- 1 root root 2532905 Sep 13 12:10 480.mp3
    -r--r--r-- 1 root root 2660801 Sep 13 12:10 487.mp3
    -r--r--r-- 1 root root 2372421 Sep 13 12:10 490.mp3
    -r--r--r-- 1 root root 2621925 Sep 13 12:10 508.mp3
    -r--r--r-- 1 root root 3222551 Sep 13 12:10 868.MP3
    -r--r--r-- 1 root root 2384299 Sep 13 12:10 886.mp3
    -r--r--r-- 1 root root 2506897 Sep 13 12:10 981.mp3

    do this to remove and refresh the database

    sudo
    -u postgres psql -c 'DELETE FROM cc_schedule WHERE id in (SELECT s.id
    from cc_schedule s LEFT JOIN cc_show_instances si on s.instance_id =
    si.id WHERE si.modified_instance = true);' airtime


    you might want to schedule files more than the default time play with this to say 2 hours
    gedit /etc/airtime/airtime.conf
    cache_ahead_hours = 2
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.