-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Podcast downloads hard time out after 300 seconds #220
Comments
Ok, trying to fix this has descended into Python egg hell. Unfortunately after trying to reinstall celery I ran into numerous odd issues that have me scratching my head. Will continue to troubleshoot. |
Ok so I resolved the issue but running pip install pip --upgrade and then proceeding to run pip had failed to find the versions before the upgrade but afterwards it was able to install airtime-celery just fine by running python setup.py install and it installed the appropriate versions and appears to be working. Now we will see if that modification to the time_limit works. I made the limit 60 minutes or 6000 seconds as I figured that would be more than adequate for everything except the slowest of Internet connections. Actually I was mistaken airtime-celery is now appearing to start based upon service airtime-celery start but it is failing to actually run and produce any loggable errors as indicated by its absence from the process list. |
So while trying to run it via the CLI - /usr/local//bin/celery worker -A airtime-celery.tasks:celery --time-limit=300 --concurrency=1 --config=celeryconfig -l INFO
|
Ok before anyone wastes their brainpower trying to decipher what has happened I managed to find a workaround. I also realized that /etc/default/airtime-celery where sudo service airtime-celery gets its config file from and the systemd install file have the hard limit of 300 seconds encoded in I'm trying to just modify that to |
From my CentOS experience the versions of celery, billiard, kombu, python-ampq and, vine need to match up to quite some degree for everything to work smoothly. Among them are some of the rare os packages that I had to replace with versions updated to a working state. If I remember correctly, celery and CentOS didn't become friends until I realized that celery 3.x is much less buggy than 4.x. For the record, CentOS has the following combo of versions that seem to work. Some of them might have distro patches applied (most shouldn't).
Some of these might also get installed by pip on vagrant boxes, I looked at the rabe rpm collection to get these versions. |
Yeah,I looked and found that JohnnyC had already increased the time limit. from 300 to 1200 to cope with big podcasts >120mb |
I tracked down where the 300 is from, let's change the default to something higher. Maybe not as extreme as 6000, I might have gone 900, but 1200 is fine with me. This is also hardcoded in the systemd unit where it should be increased and also made configurable through an env variable (overriding an It would probably make sense to add something explaining how to set this up (and what considerations the value has) to the manual. I'm not sure if it's Expert Install, Troubleshooting or, a new page in it's own right. We can add something like the following to docs: Celery Process Time LimitIf you use Celery to download podcasts or use soundcloud with large files you might need to tweak the The right value depends on your stations needs. You need to consider your own internet uplink, the podcast hosts uplink and the size of the largest files you intend to be able to download. You should also factor in general network congestion and that some of your content providers may throttle individual downloads to allow for more concurrent downloads on their uplink. The default for individual celery tasks is set to 1200 and can be changed through the |
Ok, so I just realized due station podcasts not updating that with the increased length the podcast timeout is actually causing airtime-celery to crash. Here is the log I received. [2017-08-30 13:14:09,011: ERROR/MainProcess] Task podcast-download[php_59a6dac9520c84.11909640] raised unexpected: TimeLimitExceeded(6000.0,) |
Smells like this: celery/celery#3395 (comment). I think celery doesn't call _process_cleanup_queues very often and our queues aren't very full of procs most of the time. |
So, after reading through this thread and ones linked back to it, is there a way to fix this? About half of the podcasts I'm attempting to import stall at the 300 second limit and only get about half of the show. Any thoughts? I'd be willing to post a bounty to get this fixed if needed. |
Hey @smilingpeanut welcome to the LibreeTime community. The fix I referenced above should be pretty easy to implement. We should modify the defaults for the install, but if you already have Libretime running, just modify /etc/init/airtime-celery.conf and modify the time-limit in there. It should be under We don't currently have any kind of process to handle bounties or donations at this point but perhaps we should consider it. |
Hi @Robbt, thanks for the reply. Unfortunately, no file exists at that location on my server. Here's everything I could find that was close:
|
Ok, it is most likely here then /etc/systemd/system/airtime-celery.service |
Okay, after some further digging (and adjusting the celery timeout in the location indicated, thanks!), it turns out that my LibreTime server is correctly importing the full episodes from the podcast feeds. But what seems to be happening is that a number of files (from different feeds) are only showing up with about half of their running time, ie. a 1 hour show is listed in LibreTime as only being 29 minutes long. The entire file is there, and it can be manually adjusted using the Edit functionality in LibreTime, but as you can imagine this causes an automation issue when episodes are part of smart blocks that are scheduled. The system has to add more episodes of that show to fill the time because it "thinks" the new episode is not long enough. Has anyone else had issues like this? |
Yeah, it sounds like you are getting hit with the Silan silence detection bug. This is because the version of silan included with certain debian based distros such as Ubuntu had a bug. Here is one way someone fixed it - #197 |
i wonder if autoloading playlists should also default to load half an hour before shows... |
Due to the bandwidth constraints of one of our audio providers it appears that some podcast downloads are taking longer than 300 seconds to complete. Unfortunately LibreTime has a hard cut-off of 300 seconds currently employed.
Here is the error.
[2017-06-06 09:13:11,125: ERROR/MainProcess] Task handler raised error: TimeLimitExceeded(300.0,)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/billiard-3.5.0.2-py2.7-linux-x86_64.egg/billiard/pool.py", line 661, in on_hard_timeout
raise TimeLimitExceeded(job._timeout)
TimeLimitExceeded: TimeLimitExceeded(300.0,)
[2017-06-06 09:13:11,127: ERROR/MainProcess] Hard time limit (300.0s) exceeded for podcast-download[php_5936a93aa2df19.97689474]
[2017-06-06 09:13:11,241: ERROR/MainProcess] Process 'PoolWorker-152' pid:12431 exited with 'signal 9 (SIGKILL)'
~
I will look into modification of this because this is needed for my station and I don't think we should expect all downloads to complete within 5 minutes especially for say bandwidth constrained internet connections that may occur around the globe.
The text was updated successfully, but these errors were encountered: