Title: Slow HTTP API request
Last modified: September 4, 2023

---

# Slow HTTP API request

 *  Resolved [mesw](https://wordpress.org/support/users/mesw/)
 * (@mesw)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/)
 * 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
 * [http://uusi.rilease.fi](http://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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fslow-http-api-request%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * (@jarnovos)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17026066)
 * Hi [@mesw](https://wordpress.org/support/users/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 Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17026096)
 * [@mesw](https://wordpress.org/support/users/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](https://wordpress.org/support/users/mesw/)
 * (@mesw)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17026650)
 * 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 2 years, 8 months ago by [mesw](https://wordpress.org/support/users/mesw/).
 *  Plugin Author [Aert](https://wordpress.org/support/users/aahulsebos/)
 * (@aahulsebos)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17027485)
 * Hi [@mesw](https://wordpress.org/support/users/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](https://wordpress.org/support/users/mesw/)
 * (@mesw)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17033271)
 * Now the site has been published in rilease.fi. Here is the full query monitor
   info:
 * GET
 * [https://rilease.fi](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 Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17036226)
 * Hi [@mesw](https://wordpress.org/support/users/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 Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17043304)
 * [@mesw](https://wordpress.org/support/users/mesw/) did the above help? Let me
   know if you have any further questions.
 *  Thread Starter [mesw](https://wordpress.org/support/users/mesw/)
 * (@mesw)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17043974)
 * 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 Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17044554)
 * [@mesw](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/complianz-gdpr/assets/icon-256x256.png?rev=2881064)
 * [Complianz - GDPR/CCPA Cookie Consent](https://wordpress.org/plugins/complianz-gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/complianz-gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/complianz-gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/complianz-gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/complianz-gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/complianz-gdpr/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/slow-http-api-request/#post-17044554)
 * Status: resolved