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

Increase timeout for validate URL requests and handle timeout errors #1166

Closed
westonruter opened this issue May 23, 2018 · 1 comment
Closed
Labels
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented May 23, 2018

Currently there is a 5 second timeout when doing a validate_url request:

https://github.com/Automattic/amp-wp/blob/a68c93fd62df93c6c79cf99d4917bb912e11b684/includes/utils/class-amp-validation-utils.php#L1426-L1432

Given the added overhead of locating sources and bypassing the post-processor cache (#959), it can happen that a request to validate a URL can timeout, especially when the stylesheets have not yet been processed and cached.

So not only do we need to increase this timeout, we also need to add error reporting for when validate_url returns with an error, including in bulk/inline re-check, during post save in classic editor, and doing a REST API POST/PUT. At the moment, such validation requests fail silently, meaning a user can be shown that there is no change to the improvement of validation errors.

@westonruter
Copy link
Member Author

Also, if a validate AMP URL does a redirect, the post needs to be deleted in the same way as if the URL no longer has validation errors.

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

No branches or pull requests

2 participants