Skip to content

Remove infinite loop for cron sync#5995

Closed
gravityrail wants to merge 2 commits intomasterfrom
fix/prevent-timeout-on-misconfigured-cron
Closed

Remove infinite loop for cron sync#5995
gravityrail wants to merge 2 commits intomasterfrom
fix/prevent-timeout-on-misconfigured-cron

Conversation

@gravityrail
Copy link
Copy Markdown
Contributor

We've had some reports of our cron jobs exceeding timeouts and causing errors on WP Engine (and possibly other sites).

On reflection, having a loop which just tries to send stuff until it runs out of time is probably bad behaviour. In addition, we already have code in there which tries to allow more time to do sending if there's no max_execution_time set.

This PR removes the loop that sends from cron, and just executed a single send. This may greatly slow down full sync on larger sites - perhaps - but should be sufficient for periodically syncing constants and callables.

It's probably worth it in order to be a better plugin citizen.

@gravityrail
Copy link
Copy Markdown
Contributor Author

Closed in favour of #5996 - we can re-open and apply if that's controversial :)

@gravityrail gravityrail removed the [Status] Needs Review This PR is ready for review. label Jan 1, 2017
@gravityrail gravityrail closed this Jan 1, 2017
@jeherve jeherve deleted the fix/prevent-timeout-on-misconfigured-cron branch January 9, 2017 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant