• Resolved Daniele

    (@dabesa)


    Dear support,

    On our site I get the error:

    16-May-25 18:41:18 INFO Initializing Code Profiler v1.7.5 on https://wp-ok.it. Profile: 2025-05-16_420865 - https://wp-ok.it/
    16-May-25 18:41:28 ERROR Cannot connect to the requested page: cURL error 28: Operation timed out after 10002 milliseconds with 0 bytes received

    The SSL certificate is OK and I don’t see connections blocked by the firewall.
    Already tried to disable WordFence with no luck. The site uses Cloudflare as DNS (no proxy enabled).

    What can we check?

    Thanks
    Daniele

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author bruandet

    (@bruandet)

    The profiler needs to access wp-admin/admin-ajax.php and the page you want to profile.
    Can you paste here the system information report (Code Profiler > Support)?

    Thread Starter Daniele

    (@dabesa)

    Hi @bruandet,

    I created a one-time link as there are information I’d rather not share in the forum:

    https://eu.onetimesecret.com/secret/32smg470vfwdelfgnxy13mc50rr0jza

    The hosting support says they’re not blocking local access.

    Thanks!

    Thread Starter Daniele

    (@dabesa)

    I tried disabling:

    • WordFence (waf wasn’t enabled anyway)
    • WPremote firewall
    • renaming .htaccess

    But did not help.

    Here the logs with debug:

    16-May-25 18:41:18 DEBUG Entering AJAX endpoint (profiler initialization)
    16-May-25 18:41:18 DEBUG Verifying security nonce
    16-May-25 18:41:18 DEBUG Checking MU plugin availability
    16-May-25 18:41:18 DEBUG Retrieving parameters #1
    16-May-25 18:41:18 DEBUG Retrieving parameters #2
    16-May-25 18:41:18 DEBUG Retrieving parameters #3
    16-May-25 18:41:18 DEBUG Retrieving parameters #4
    16-May-25 18:41:18 INFO Initializing Code Profiler v1.7.5 on https://wp-ok.it. Profile: 2025-05-16_420865 - https://wp-ok.it/
    16-May-25 18:41:18 DEBUG Retrieving parameters #5
    16-May-25 18:41:18 DEBUG Creating security key
    16-May-25 18:41:18 DEBUG Building HTTP query
    16-May-25 18:41:18 DEBUG Checking HTTP options
    16-May-25 18:41:18 DEBUG Sending HTTP request
    16-May-25 18:41:19 DEBUG Setting size of memory buffer to 10MB
    16-May-25 18:41:19 DEBUG Starting profiler
    16-May-25 18:41:28 ERROR Cannot connect to the requested page: cURL error 28: Operation timed out after 10002 milliseconds with 0 bytes received

    Which command is being executed, exactly? I can try from the terminal.

    Plugin Author bruandet

    (@bruandet)

    According to the log and the system information report, the profiler can access admin-ajax.php without any problems. But it’s connection to your site, i.e., the page to profile, cannot occur due to a connection timeout.
    Code Profiler uses the WordPress API, which makes use of the PHP cURL extension.

    Can you run this command from your server: host wp-ok.it
    Does the returned IP is correct ? Did you make change to your server’s /etc/hosts file? Did you change your DNS lately?

    You can also have a look at your PHP error log, although I’m not sure it will help: /home/wpokit/public_html/wp-content/debug.log

    Thread Starter Daniele

    (@dabesa)

    Hello @bruandet ,

    The IP returned is correct:

    [wpokit@cloe ~]$ host wp-ok.it
    wp-ok.it has address 157.90.192.96

    there was no DNS change, and if I try “curl https://wp-ok.it/” (with or without trailing slash) the page is returned correctly.

    In the debug I have this, also unrelated:

    [30-Sep-2025 10:04:49 UTC] PHP Notice:  La funzione _load_textdomain_just_in_time è stata richiamata <strong>in maniera scorretta</strong>. Il caricamento della traduzione per il dominio <code>hello-elementor-child</code> è stato attivato troppo presto. Di solito è un indicatore di un codice nel plugin o nel tema eseguito troppo presto. Le traduzioni dovrebbero essere caricate all'azione <code>init</code> o in un secondo momento. Leggi <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> per maggiori informazioni. (Questo messaggio è stato aggiunto nella versione 6.7.0.) in /home/wpokit/public_html/wp-includes/functions.php on line 6121

    I also tried changing PHP version from 8.2 to 8.1 but it’s the same.

    I am a bit lost!

    Thanks

    Thread Starter Daniele

    (@dabesa)

    @bruandet I’m testing on staging and it depends on a plugin!
    I still don’t know which one but I’ll let you know 🙂

    Thread Starter Daniele

    (@dabesa)

    @bruandet bingo!

    I found a custom plugin that was changing the curl timeout values…

    add_action('http_api_curl', 'sar_custom_curl_timeout', 9999, 1);
    function sar_custom_curl_timeout($handle)
    {
    curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 10); // 30 seconds.
    curl_setopt($handle, CURLOPT_TIMEOUT, 10); // 30 seconds.
    }

    I guess 10 seconds isn’t enough, I just removed the function.

    Thanks for your help!!

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

You must be logged in to reply to this topic.