• ResolvedModerator threadi

    (@threadi)


    Hi,

    for quite some time now – spanning several versions of Real Cookie Banner – I’ve been struggling with the following issue in one of my personal projects:

    As soon as the plugin is activated, it attempts to update records in the rcb_template database table. There are around 21,000 entries there, and the process never completes – even after a full day.

    The code responsible for this update is the updateOutdated() function within StorageHelper.php. I tried commenting out the specific line that performs the update to see what would happen. The result: as soon as I activate the plugin, another database statement kicks in, intended to clean up the data.

    This process is also located in StorageHelper.php. Within the persist() method, multiple DELETE statements are apparently executed in a loop. That in itself isn’t a disaster, but why does this process never finish either? I’ve waited a full day multiple times, only for it to keep running endlessly.

    I decided to empty the rcb_template table, which allowed me to activate the plugin without issues. However, at some point, it downloads the templates – again, around 21,000 of them. And once more, that last script starts running and just keeps going – endlessly.

    The biggest problem is that the entire website fails to load while the script is running. Every page request triggers the script execution. Consequently, I end up with dozens of these never-ending processes running in parallel.

    I realize that this table holds the page templates the plugin uses to map functions to cookies – something obviously required to use the plugin. I’ve never encountered this issue with the plugin on other projects, so I suspect it might be due to a server-specific quirk (it’s my own server, so I have full access). However, the server is up to date, running MariaDB 10.11.14 and PHP 8.4.

    The only way I can resolve the issue is by deactivating Real Cookie Banner. But that’s not my goal, after all ^^

    What can I do to fix the problem? Any ideas? 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Matthias Günter

    (@mguenter)

    Hey @threadi !

    Unfortunately, according to the WordPress.org forum guidelines, we are not allowed to provide support for the Pro version of our plugin. I therefore have to ask you to open a ticket via the following page: https://devowl.io/support/

    Moderator threadi

    (@threadi)

    I don’t have the Pro version; I have the free one.

    Plugin Contributor Matthias Günter

    (@mguenter)

    Hi again @threadi !

    Sorry, from the initial request I understood it in such a way that so many templates are downloaded because of the Pro version.

    I think that on your website there might possibly be a race condition, so no locking takes place and the templates are downloaded again and again. Could you please create a completely new WordPress instance as a test and check whether you run into a similar problem there? You can use a service like https://localwp.com/

    Moderator threadi

    (@threadi)

    I had already tried this on several test systems before posting my message and couldn’t reproduce the issue there. I still can’t today either. So I tried uninstalling the plugin completely and deleting all its data, but I can’t do that either. How can I delete the plugin and make sure all the data is actually deleted so I can start over from scratch?

    Plugin Contributor Matthias Günter

    (@mguenter)

    Hi again!

    We unfortunately do not offer any function to completely uninstall the plugin (sorry for this, but it is planned!), and I also do not think that this is the problem, since the template updater only depends on the wp_rcb_template database table.

    To rule out an incompatibility with another plugin or theme, could you please temporarily deactivate all other plugins and also switch the theme to a default theme and check whether the error still occurs after you have truncated the table in the database?

    Moderator threadi

    (@threadi)

    I also tried that in a staging environment, but it didn’t work. I experimented a lot and did some debugging. But since I a) clicked “Reset” in the settings and b) increased the memory_limit, the error hasn’t occurred again. However, I don’t see any technical connection there – it could just be pure coincidence. Case closed for now.

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

You must be logged in to reply to this topic.