• Resolved Joshua David Nelson

    (@joshuadnelson)


    Hello,

    I’m working on a site and moving to transitional mode, we have a handful of pages that cannot be AMP and prefer the ?amp url.

    Over the course of working on this over the last month I have used the wp-cli validation command to validate all the urls and debug issues. I recently reset my local database, using fresh content, and having made more code changes, came back to run validation but it looks like everything is timing out.

    I’m on MAMP, Apache with php v7.4.2, running WP 5.3.2 and 5.4 alternatively, with quite a few plugins. I’ve tried going down to just AMP and TwentyTwenty, that works without issue, so it’s likely a plugin or theme conflict, but I’m having a hard time finding the issue.

    The PHP error log had some entries of: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 – but generally quiet in comparison to the other two…

    Apache error log is full of: [error] [client ::1] Handler for fastcgi-script returned invalid result code 53

    WP Debug.log: https://gist.github.com/joshuadavidnelson/7c8c7e462b2fd6a743e46681cc4db72e.

    Site health info: https://gist.github.com/joshuadavidnelson/61b4feb6da1d8f383baf24f873da849e

    I think this is possibly related to my local setup or a conflict between plugins, but I’m hoping you can help point me in the right direction. I’m right near the finish line and I’m having a hard time figure it out.

    Appreciate the help!
    Joshua

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Joshua David Nelson

    (@joshuadnelson)

    I was able to find much of the errors appeared between AMP plugin v1.4.4 and 1.5.2. Trying to track down when this all started, and it’s certainly not completely eliminating the errors, but reverting back to v1.4.4 a lot of issues appear to be resolved (or errors quieted at least)

    @joshuadnelson Apologies for the late response. Can you share your site URL and further details on this and we can investigate, I couldn’t locate it in your Site Health?

    If you prefer to share privately you can use this form, we can respond here.

    Thread Starter Joshua David Nelson

    (@joshuadnelson)

    Hey James!

    This is a local site I’m working on, the production site does not have it implemented yet. The staging site is behind a VPN and would require a bit more work to coordinate on. I could see about getting you access to the github repo and/or a copy of it to spin up locally on your end. I submitted the full site health and such in the form as well.

    I’m still getting the errors, but I was able to run a full validation on our content last night (only a few errors in the process, not full stop). I’m not sure if it’s related, but now the staging site isn’t full rendering AMP templates (it appears related to the validation process perhaps, the output is partial AMP/HTML but missing things).

    Is there a way to filter/alter/intercept validators easily?

    Let me know the best next steps, appreciate the help!

    Thanks,
    Joshua

    Plugin Author Weston Ruter

    (@westonruter)

    @joshuadnelson Do you have Xdebug enabled? That may be the cause for the PHP timeout.

    I’m also noticing you’re using glue-for-yoast-seo-amp. This plugin shouldn’t be necessary anymore, as Yoast itself is fully AMP-compatible.

    For the cURL issue, in Site Health do you see any failures in regards to loopback requests?

    Plugin Author Weston Ruter

    (@westonruter)

    Also, in 1.5 we introduced the AMP Optimizer which does use cURL to fetch some assets to inline some CSS.

    You can try disabling the Optimizer to see if that eliminates the problem as a way to narrow down what the problem is:

    add_filter( 'amp_enable_optimizer', '__return_false', 100 );

    Or to just try disabling the SSR aspect of the Optimizer:

    add_filter( 'amp_enable_ssr', '__return_false', 100 );

    Please check to see if one or both of those resolve the issues.

    Thread Starter Joshua David Nelson

    (@joshuadnelson)

    Hey there,

    Getting back to this, no luck on resolving issues via those filters. Disabling xdebug didn’t have any impact locally, though I will keep it disabled just in case.

    My local wp-cli validation returns the same cURL errors, like the one below, but is slowly validating pages.

    Warning: Validate URL error (http_request_failed): cURL error 28: Operation timed out after 15000 milliseconds with 0 bytes received URL

    The staging site is not full rendering AMP content – it looks like a mixture of AMP and non-amp content, the amp.state functionality doesn’t work and none of the images are showing up. This doesn’t happen on my local site, though. Locally I’m running MAMP/Apache, staging is using nginx. Locally I do have some SVG and one specific image in the footer that are getting stripped out but not showing up in validation/error index.

    It looks like it’s related to something in the sanitizer and output buffering, here’s an error I found in the debug.log (full stack trace output here):

    
    PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /wp-content/plugins/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php on line 1015
    PHP Fatal error:  Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
    

    Any ideas? I’m guessing that some process related to the AMP version is timing out, but I can’t track it down. Per the errors above (which also appear in the apache error log), it looks like something in AMP_Tag_And_Attribute_Sanitizer.

    Appreciate the help!

    Thanks,
    Joshua

    Plugin Author Weston Ruter

    (@westonruter)

    It shouldn’t be taking so long for the AMP plugin to process the page.

    One possible way to identify what is causing the slowness is to enable this helper plugin which turns on Server-Timing response headers: https://gist.github.com/westonruter/053f8f47c21df51f1a081fc41b47f547

    This can give an indication into what sanitizers are taking so long.

    Otherwise, the next step to debug this would be to dig into the code and add breakpoints/logging during the post-processing phase to isolate what the issue is.

    Thread Starter Joshua David Nelson

    (@joshuadnelson)

    Thanks for the assistance! I had to put this project on hold for some time, but I think I’ve got it working. I’ll be back at in next month and, if needed, I’ll reach out again.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘AMP Validation cURL Error 28, Fastcgi error 53’ is closed to new replies.