Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

clarify the preference for cron jobs #2988

Closed
umlaeute opened this issue Apr 6, 2017 · 2 comments
Closed

clarify the preference for cron jobs #2988

umlaeute opened this issue Apr 6, 2017 · 2 comments

Comments

@umlaeute
Copy link

umlaeute commented Apr 6, 2017

the documentation mentions three ways for setting up a cron-job to do maintenance tasks:

  • ajax
  • webcron
  • cron

while the documentation does state that cron is the preferred way and ajax not, i find that statement a little bit too soft.
it seems that currently using ajax will sooner or later break the system, since more and more owncloud jobs have been backgrounded to cron - practically too many jobs to be handled by ajax.

the docs mention that i should use webcron/cron when using the "Activity App" - but this app is enabled by default, so i wasn't really aware that my site was actually using it (i never turned it on); it also mentions external storage, which i don't use at all. this basically resulted in discarding the warning as "not for me".

i understand why ajax is the default (it requires zero configuration), but the documentation should stress more, that one should get a proper cronjob running.

user story

i'm running a smallish site (~50 users), and upgraded to owncloud9 (from oc7) about 8 months ago.
since then (i suspect), the cron backlog has accumulated to 120000 (120 thousand) jobs.
the instance was using ajax as cron-backend which obviously didn't manage to trigger that many jobs.
it seems that the only viable solution would have been to use a proper cron script from the beginning (webcron seems to only handle a single job per polling, and it is recommended to run this every 15 minutes - for 120000 jobs this is about the time my instance is online...)

it seems that i'm not the only one having trouble with the ajax cron, so documentation should be very clear about using it only as a last ressort:

suggestion

  • sort the various cron methods by preference: "crontab, webcron, ajax" rather than the other way around
  • make it clear that crontab is the preferred way (clear as in "alert box", rather than casually
  • make it clear that ajax cron should only be used as a last ressort (and explain why it is the default)
    mentioning it in the running text); mention that ajax cron is known to cause backlogs (or simile)
@settermjd
Copy link
Contributor

Thanks @kdslkdsaldsal for the extra information and thanks @umlaeute for raising the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants