• Resolved kevinsnejstrup

    (@kevinsnejstrup)


    Hello. I use this plugin on multiple websites of mine. It works great!

    But after the latest update, I seem to be getting this error over and over again, no matter of the settings I use. (Both with and without the new fallback!)

    This is the error I get: Connection error: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received

    I do not understand why, thus why it would be awesome if you could help me out!

    Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • From yesterday same problem too..What happens ?

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi,
    can you tell me WHEN you receive the error and send me the error log file?

    hello Salvatore and thanks for the answer..I am Italian like you (I guess by name and surname) ..
    However it happens when I try to enable the cache for the first time (enable page caching) after adding api and email .. it also happens using api token ..
    The log cannot be read because it does not “log” anything ..

    debug.log 0 bytes

    While pointing out a potential problem:

    The jsons that contain the access data to CF with tokens and bees are clear and can be accessed externally
    https: //xxxx/wp-content/wp-cloudflare-super-page-cache/xxxx/main_config.json

    same thing for the

    https: //xxx/wp-content/wp-cloudflare-super-page-cache/xxxx/ttl_registry.json

    other thing i forgot to report to you about cURL error 28 (subject of this discussion)
    When I try to start the page caching for the first time as I wrote before the CF page rule is not even created … it is as if the connection request with CF timed out

    I also tried with other domains on the same account and the same situation..and other account with other domains..nothing

    I have tried to “downgrade” plugin to older version and it’s the same issue..at this point could be a CF issue ??

    • This reply was modified 4 years, 7 months ago by zicoxx.
    • This reply was modified 4 years, 7 months ago by zicoxx.
    Thread Starter kevinsnejstrup

    (@kevinsnejstrup)

    It did not create any debug.log file on the website with the problem (within the wp-content/wp-cloudflare-super-page-cache/my-website)

    But I haven’t upgraded to the newest version on my other ones.

    Thread Starter kevinsnejstrup

    (@kevinsnejstrup)

    The error is shown after clicking “ENABLE PAGE CACHING NOW”- button.

    I did configure everything correctly, which I know is correct, since this is the first time I ever get an error with your plugin.

    Love your plugin btw!

    this plugin is not discussed, it is excellent and the choice to integrate a fallback cache I find it immensely useful as the integration for the use of workers..and anyway we consider that CF is having problems these days so this situation may not be because of the plugin ..
    In truth, I am more worried about jsons remotely accessible by everyone than this problem which I think will somehow be solved

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Ok guys, so the error happens on first activation only? I try to replicate it, but if you can give me a live (staging) website to check it, I can be faster to release the patch.

    But one question: by chance did you enable worker mode on an existing site? If yes, remember to assign the correct permissions to your API token before re-enabling the cache

    @zicoxx: regarding the sensitive information in json files, you’re right. I will fix this on next release

    Thread Starter kevinsnejstrup

    (@kevinsnejstrup)

    Hi again!
    Give me an email, I will replicate the error on a pseudo domain I have, and send you login details.

    Thanks!

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi guys,
    I successfully replicated the error. It’s a timeout of Cloudflare. I increased the timeout from 5 seconds to 10 and now works.

    Please edit the file libs/cloudflare.class.php and replace the method get_api_headers() with this one:

        function get_api_headers() {
    
            $cf_headers = array();
    
            if( $this->auth_mode == SWCFPC_AUTH_MODE_API_TOKEN ) {
    
                $cf_headers = array(
                    "headers" => array(
                        "Authorization" => "Bearer ".$this->api_token,
                        "Content-Type" => "application/json"
                    )
                );
    
            }
            else {
    
                $cf_headers = array(
                    "headers" => array(
                        "X-Auth-Email" => $this->email,
                        "X-Auth-Key"   => $this->api_key,
                        "Content-Type" => "application/json"
                    )
                );
    
            }
    
            $cf_headers["timeout"] = 10;
    
            return $cf_headers;
    
        }

    Let me know if it works for you and I will release “the patch” on next days together with other minor fix.

    Hi there,

    your suggested fix is running fine on my environment.
    Thank you @salvatorefresta

    Thread Starter kevinsnejstrup

    (@kevinsnejstrup)

    Works like a charm on my end as well!

    Also tested the Fallback Caching with it as well, works like a charm.

    Thank you for the quick fix, you are a saint @salvatorefresta

    @salvatorefresta your patch works like a charm..very thanks ’cause i had a production site where CF cache is essential..

    in any case I’m happy to have given a hand to improve the plugin

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Thank you all!

    Released version 4.3.0 with all bugs fixed, please upgrade ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Connection error: cURL error 28’ is closed to new replies.