• Resolved phloo

    (@phloo)


    Sending following command via ssh we get an error
    “wp fvm purge”

    Returns:
    “http_request_async curl error: Connection timed out after 1000 milliseconds
    Success: FVM and other caches were purged.”

    We contacted the host (WPE) but couldn’t find a reason for the timeout yet.
    Any idea why it happens?

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter phloo

    (@phloo)

    Update: talked to the guys at WPE and here is the newest info. We ran the commands with debugging on the live site and got the “error” message, which I guess, results in the curl timeout.

    Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.688s)
    Debug (bootstrap): Running command: fvm purge (0.688s)
    something went wrong while purging WP Engine CDN: Es wurde keine gültige URL übermittelt.
    PHP Notice:  Undefined offset: 0 in /XXXXXXX/wp-content/mu-plugins/wpengine-common/plugin.php on line 2131
    Notice: Undefined offset: 0 in /XXXXXXX/wp-content/mu-plugins/wpengine-common/plugin.php on line 2131
    Success: FVM and other caches were purged.

    Here is the code part from the plugin

    View post on imgur.com

    Maybe this helps to show whats happening.

    Plugin Author Raul P.

    (@alignak)

    Thank you, it’s a mixed problem.

    My plugin should not request their plugin to purge cache, if there is nothing available to purge (such as the cdn) and their plugin should have checked if the offset is defined, before attempting to do anything.

    The easiest fix would be on their plugin side, as they should be checking if purge requests from other plugins are valid.

    But I’ll look into it on my end as well, when I have a bit more time.
    It’s not a critical issue right now, though it’s on my list.

    • This reply was modified 4 years, 7 months ago by Raul P..
    Thread Starter phloo

    (@phloo)

    Yeah, I saw they do not check if the given parameters are correct.
    I will forward your reply. It’s not an important bug but nice to polish all “errors”.

    Thanks

    Plugin Author Raul P.

    (@alignak)

    From what I saw on wp rocket and others, thye no longer purge the cdn.
    I removed the cdn purge option from the plugin as well, since FVM already does cache busting and it should not need to purge it.

    The code I am using is correct and it’s similar to wp rocket.
    WP Engine that should add an extra check there to see if the request is valid.
    Other than that, it should work.

    Thread Starter phloo

    (@phloo)

    Good. I am working on this – they forwarded it to their devs
    I am sure they will add the check, it’s not a big deal.

    Thanks for investigating. Glad we could find the issue.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘wp cli command returns timeout’ is closed to new replies.