• Resolved mesw

    (@mesw)


    Hi,

    Complianz is slowing down the WordPress backend. I’m using Query Monitor and noticed that on every admin page load there is this kind of slow HTTP API request (parameters change):

    GET

    https://uusi.rilease.fi
    ?complianz_scan_token=1693857909
    &complianz_id=home200 OK++

    1. cmplz_cookie_admin->run_cookie_scan()

    Plugin: complianz-gdpr

    Size: 23,6 kB


    Timeout: 5


    Time: 2,4626

    ————-

    Sometimes it takes over 5 seconds and it timeouts. What could be the problem?

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @mesw,

    The described behavior appears to occur when the Cookie Scan runs on your environment.

    While you could always activate the “Disable the automatic cookie scan” option under Complianz -> Settings -> Cookies, the first thing that I would recommend is to verify whether the behavior persists with Complianz as the only active plugin, to rule out other plugins as being potentially related.

    If that doesn’t change the behavior yet, I would also recommend checking if there are any errors being logged in the “Console” of your browser’s Developer Tools, when you perform a Cookie Scan under Wizard -> Consent -> Cookie Scan.

    If so, perhaps you can post a screenshot here, so we may take a look at those?

    Kind regards, Jarno

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @mesw please also note that this will stop as soon as the cookie scan completes, which processes 5 pages in each scan.

    After that it’s done for a month.

    Thread Starter mesw

    (@mesw)

    I deactivated all the plugins except query monitor and switched to default theme. I also disable the automatic cookie scan.

    I tried the scanning again and there is no an errors shown on the browser console when doing it.

    The HTTP API call is still made on every wordpress backend page load. Now the exectution time is about 0.15 seconds which is considerably less than with the plugins on. But still its running on every page load. What should I do?

    • This reply was modified 1 year, 2 months ago by mesw.
    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @mesw,

    Could you post the exact call, because 0.15sec doesn’t sound like a cookie scan and I can’t reproduce it at my end,

    regards Aert

    Thread Starter mesw

    (@mesw)

    Now the site has been published in rilease.fi. Here is the full query monitor info:

    GET

    https://rilease.fi
    ?complianz_scan_token=1694093146
    &complianz_id=home

    200 OK-

    • DNS Resolution Time: 0,0013
    • Connection Time: 0,0014
    • Transfer Start Time (TTFB): 1,9684
    • Response Content Type: text/html; charset=UTF-8
    • IP Address: 95.216.140.247
    1. cmplz_cookie_admin->run_cookie_scan()
      wp-content/plugins/complianz-gdpr/cookie/class-cookie-admin.php:2280
    2. do_action('admin_footer')
      wp-includes/plugin.php:517

    Plugin: complianz-gdpr

    Size: 24,0 kB

    Timeout: 5

    Time: 1,9736

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @mesw,

    This is indeed the cookiescan. The api request is the plugin requesting a page with wp_remote_get(), which retrieves the html of the site so the plugin can scan for services, statistics tools, etc.

    First of all, the cookie scan can not slow down your website for visitors, as it only runs on the admin, for a logged in administrator. A visitor is never logged in as administrator, so will never get this request.

    Secondly, the cookie scan does 5 pageloads in a row, until the scan is completed. Scanning could take longer than usual if:

    – you have a very large site (meaning a lot of pages)
    – or you’re only logged in very short periods of time, which gives the plugin not enough time to get on with the job.

    In both cases, my recommendation would be to leave your site open in the browser, logged in, for a while, to let it complete. As it doesn’t run for visitors, only you as admin will see this request.

    Alternatively, you can completely disable the cookie scan by adding

    define('CMPLZ_DO_NOT_SCAN', true);

    to your wp-config, disabling it in the settings will stop it from starting automatically in the future, but will not stop a current run, so using the constant will be more effective.

    Let me know if you have any questions about this.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @mesw did the above help? Let me know if you have any further questions.

    Thread Starter mesw

    (@mesw)

    Thanks! define(‘CMPLZ_DO_NOT_SCAN’, true); did the trick and made wp backend much faster.

    I was long time logged in and browsed the wp admin but the cookie scan never stopped. The site has about 100 pages so if it scans 5 per page load it should have finished already. Any idea what causes this?

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @mesw That is difficult to say, we haven’t been able to reproduce this behaviour. Possibly there is a setting that blocks the loading of the website in the iframe, or the server blocks the requests.

    Often these blocks are caused by overly enthusiastic security services.

    Glad to hear this has resolved your issue!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Slow HTTP API request’ is closed to new replies.