-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
15 minute cron.php magic value? #30480
Comments
absolutly - docs need to be adjusted @settermjd |
So, it's agreed that the value's to be adjusted to every minute? |
Will system cron automatically run the command in parallel in case invocation 1 is taking much longer ? Or will cron skip the next runs until the first invocation returns ? |
@PVince81 Implementation detail I guess.. (and since you say parallel invocations are OK it's fine) |
I'm talking about system cron, the stuff that runs on a Linux system, not ownCloud cron. |
@PVince81 me too. system cron invoking php cron.php in parallel or serial is both oK? |
Yes, but might influence the expectation of the admin. If we are sure that all versions of system cron behave the same then the recommendation will be accurate, no surprises. |
We're running ownCloud in bigger installations. cron.php is running every 15 minutes. In our biggest installations with more than 10.000 users cron.php is running sometimes really long, sometimes for several hours. (6-day activity with 900k entries). So it won't make sense for us, to run cron.php every minute. For others, it might be useful. @PVince81: As far, as I know, the Linux cron daemon is executing cron jobs from crontab every minute, if you configured * * * * * as time/date specs. */15 * * * is executing every 15 minutes. |
@GrendelWWU the jobs will automatically run when is needed, not all jobs will start each minute (for example email-activity starts only every 15 minutes) and if you have many server it will bock that job until it finished. some other jobs like trashbin or versions would be better if they start at different times. As you say, the admin at the end of the day has the last word, but I find the idea good that the server manages their working times better. I will test it and I will provide more feedback later. |
@GrendelWWU could you elaborate on "6-day activity with 900k entries" I am interested about this as I have been touching this code recently to make some improvements. Separate ticket? Or central? |
So whilst we have job locking ( so parallel cron runs is ok ), some jobs take longer than their interval, which means they will be running in parallel and the number of parallel running jobs can gradually increase out of control. In reality, we need to optimise our jobs, so that they are not taking such long times. I would be interested in any large jobs which take > 15 minutes to see where we can make improvements => new tickets. |
Hello Tom, we're storing our activity for 6 days, but sometimes cleaning will fail. We discussed that some time ago. Cleaning in slices would be a great idea. Look at this: MariaDB [rwth_aachen]> select from_unixtime(timestamp) from oc_activity order by timestamp desc limit 1; MariaDB [rwth_aachen]> select count() from oc_activity; |
Thanks @GrendelWWU . Addressed here - owncloud/activity#610 :) Chunking used on mysql where DELETE with LIMIT is supported - and the only case at the moment where the large row number delete is known to cause issues. |
As @cdamken mentioned this should not matter. Internally, our 'Jobs' have their own intervals. Some could be defined as per-minute in which case they would be triggered with each cron.php execution, others are hourly so despite cron.php being executed every minute, they would only run once per hour. Yes - we still face issues where jobs overlap their own intervals, but this is the same as we face right now. |
@PVince81 I propose making 1 minute the default. Internally I believe we have the necessary mechanisms for this to work correctly. |
Ok, but we're having up to 10 ownCloud/sciebo Installations on one server. So we configured our crontab, so run cron.php every 15 minutes. Every call for each instance is coded separately. |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
Thomas, it will be better that you configure on all your servers. then the load of the process is not on one: for example: Server1:
Server2:
Server3:
|
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
I noticedwhen trying announcement_center that announcements are only shipped when cron is run(https://github.com/owncloud/announcementcenter/blob/master/lib/BackgroundJob.php @tomneedham )
Which is every 15 minutes when you configure according to documentation, but maybe more when webcron or ajax cron is used. https://doc.owncloud.org/server/10.0/admin_manual/configuration/server/background_jobs_configuration.html#cron
So when using system cron the magic 15 minute value is also in cron.php: https://github.com/owncloud/core/blob/master/cron.php#L110
My gut feeling would say that background jobs should be run much more often (once per minute), then my announcement notification would have showed up much earlier...
But @butonic would disagree as jobs could take ages: #25350 (comment)
Although we support concurrent cron.php invocations though so maybe it's not an issue as a job would get locked while it is executed, so in the next minute would run another job?)
(thanks @PVince81 for the chat)
Maybe this issue is a duplicate/overlap with #23544
The text was updated successfully, but these errors were encountered: