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

Timeout issues when adding/editing a site #86

Open
stephenharris opened this issue Oct 23, 2015 · 2 comments
Open

Timeout issues when adding/editing a site #86

stephenharris opened this issue Oct 23, 2015 · 2 comments

Comments

@stephenharris
Copy link

If there are sufficient number of sites being syndicated (I've seen this with 71 sites) then adding a new site or editing an existing site results in a 500 error (PHP Fatal error: Maximum execution time of 30 seconds exceeded).

The reason is that editing, creating or deleting a site clears the cron jobs and so triggers a content pull. If the content pull takes too long, the user gets a white screen.

The obvious fix is to remove these too lines: https://github.com/Automattic/syndication/blob/master/includes/class-wp-push-syndication-server.php#L50-L51

but I'm not sure if those two lines are strictly necessarily or not. Beyond not having to do a manual pull or wait till the next scheduled pull for changes to be reflected, there doesn't seem to be any advantage.

@stephenharris
Copy link
Author

Doh! Obviously, resetting the cron jobs is required, when you're adding a new site. Instead I've set the initial time for the cron job to be time() + 60 rather than time() - 1 since the latter seemed to be triggering the job immediately and as part of the same request.

This 'breaks' the 'pull now' which doesn't quote pull now, but in a minutes time...

@emrikol emrikol added this to the v2.1 milestone Aug 2, 2016
@emrikol
Copy link
Contributor

emrikol commented Aug 2, 2016

It looks like this may still be an issue for v2.1. When there are a large number of sites, it still iterates through them and creates a cron job.

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

No branches or pull requests

3 participants