Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter adamwking

    (@adamwking)

    WPEngine ended up removing the WebP Express nginx rules we set up as part of this thread as it was overloading the server. 504 and 427 errors were abounding and we couldn’t figure out a fix. At first they couldn’t figure out where the problem was coming from other than there seemed to be a lot of calls being made to “heartbeat”. At first we thought it was unrelated to WebP Express, then I thought maybe it was because EWWW Cloud Optimizer’s connection had lapsed and the processing was happening on the server via the Gd extension fallback. But ultimately the problem kept getting worse, and this is what their support folks had to say when they finally thought they’d pinpointed it and removed the nginx rule:

    The site appears to be running a large amount of GET calls that are producing numerous 504s. The issue is with with the “WebP Express”, as I see there is an nginx rule in place to take every JPG and PNG file and rewrite the URLs to:

    /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content
    This is causing apache to load each image and will eventually start 504’ing with more images loading on the page. Based on this, I highly recommend we remove this nginx rule from your install.

    We have now removed the Nginx Rule that was used for WebP Express. This in turn will reduce the strain on Apache and prevent any 504s it was previously causing.

    I’ve still got WebP Express configured and running on another WPengine site, and it seems to be working now that I turned on AlterHTML with <picture>, but certain JPEGs aren’t rendering (in the case I’m seeing right now, it’s a jpg background-image tag inserted with an inline style.) Also, visiting any image URL directly (eg. https://mktgdev.eventmobi.com/wp-content/uploads/2018/04/Event-Apps-Home-Page-Banner-1024×853.png) doesn’t load an image, but instead shows the error “It seems you are visiting this file (plugins/webp-express/wod/webp-on-demand.php) directly. We do not allow this.” So maybe WPE is starting to actively block WebP Express? Unsure. About to ask their support about it.

    Thread Starter adamwking

    (@adamwking)

    Victory! On WP Engine, WebP is now being served after upgrading to 0.81 and putting in the new nginx rules

    if ($http_accept ~* "webp"){
      rewrite ^/(.*).(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content break;
    }

    Thanks so so much for your work on this, @roselldk!

    • This reply was modified 6 years, 3 months ago by adamwking. Reason: typo

    Gotta agree with the OP here. Don’t all reputable theme/plugin devs use wp_enqueue_script? It was my understanding that it’s the *proper* WP way.

    I’m doing a CookieBot implementation for our company’s WP site now and it’s insane having to figure out how to edit each script tag (and having to figure out what to categorize each, even though you already have them categorized in your admin system.)

    Having individual add-ons made for each plugin that have to be installed one by one sounds like an ongoing nightmare for all involved. (Though it would be better than the status quo.) What’s more, if we’ve got cookie-ing scripts enqueued in our custom theme that Cookiebot knows about, those still will always need custom work, whereas the OP’s method could cover all or most of the edits involved in that as well. (Whereas the plugin addon method will never help with custom theme enqueues.)

    • This reply was modified 6 years, 10 months ago by adamwking.

    Mine sent just 1 email as well! Appears whatever you did worked! Will update if the issue re-appears in the coming days at all.

    Thanks, appreciated! Will let you know.

    Sent.

    Same thing is happening to me! Has been every night for the past few days —?sometimes less (maybe a dozen) sometimes more (over 100 last night) — but I think it may have been started around the time of by the upgrade to the latest 3.6.1 WordPress version possibly? Unsure.

    UpdraftPlus Version 1.7.20 installed here.

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