Skip to content
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

Don't run cron.php for 14min but only 4 #34266

Closed
wants to merge 1 commit into from
Closed

Conversation

marcelklehr
Copy link
Member

Apparently cron.php runs for 14min but is called every 5 minutes.
Is there a reason for the discrepancy?

Original issue: nextcloud/recognize#335

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@nickvergessen
Copy link
Member

Is there a reason for the discrepancy?

Yes, on bigger instances it often happens that one execution in parallel is not enough, so we use this to run ~3 in parallel.

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended

@marcelklehr
Copy link
Member Author

I see. On smaller instances it can create high load, though. Wouldn't it be simpler to have the admin add additional entries in crontab if they want higher throughput?

@nickvergessen
Copy link
Member

On smaller instances it can create high load, though

How so? if there are no jobs, nothing is being done?

@marcelklehr
Copy link
Member Author

On smaller instances it can create high load, though
How so? if there are no jobs, nothing is being done?

I meant small as in a Raspberry Pi for example. People running nextcloud on there may not have the resources to run 3 cron jobs in parallel.

@juliushaertl
Copy link
Member

Yes, on bigger instances it often happens that one execution in parallel is not enough, so we use this to run ~3 in parallel.

Shouldn't we rather recommend to setup multiple cron jobs then? That way admins stay in control on how many parallel processes are running and can adapt that to the available resources.

@kc9jud
Copy link

kc9jud commented Jan 11, 2023

Alternatively, this "maximum number of simultaneous cron jobs" should be configurable.

@szaimen szaimen added this to the Nextcloud 26 milestone Jan 11, 2023
@szaimen szaimen added the 3. to review Waiting for reviews label Jan 11, 2023
@kc9jud
Copy link

kc9jud commented Jan 11, 2023

Yes, on bigger instances it often happens that one execution in parallel is not enough, so we use this to run ~3 in parallel.

@nickvergessen On one end we have "resource-constrained systems which can only handle a single simultaneous execution". On the opposite end of the spectrum where there are "resource-rich systems with lots of available cores/parallelism" and "large instances where one execution is not enough". I don't think "cron.php takes longer than 5 minutes" actually gives you enough information to distinguish between the two scenarios, so some configuration flag (either in Nextcloud itself or via scheduling multiple cron jobs) is needed.

@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
This was referenced May 3, 2023
@skjnldsv skjnldsv modified the milestones: Nextcloud 27, Nextcloud 28 May 9, 2023
@nickvergessen nickvergessen deleted the fix/cron-php-4mins branch July 27, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants