wordpress-https icon indicating copy to clipboard operation
wordpress-https copied to clipboard

WPDB error when updating https_unsecure_external_urls

Open dave1010 opened this issue 11 years ago • 2 comments

I've just got this error message in version 3.3.0 (I've trimmed about 1MB of serialised array data from the SQL):

WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query UPDATE `wp_options` SET `option_value` = '..............................' WHERE `option_name` = 'wordpress-https_unsecure_external_urls' made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), call_user_func_array, WordPressHTTPS_Module_Core->redirect_check, WordPressHTTPS->redirect, WordPressHTTPS->makeUrlHttps, WordPressHTTPS->addUnsecureExternalUrl, Mvied_Plugin->setSetting, update_option

This pushes the query over the limit (which caused error logs to grow at 2MB/s and the server's CPU to spike). I can increase the limit but it seems strange that the plugin is trying to update that much data. It looks like there's about 4000 URLs in the option_value, which I would have thought would be much less than 1MB.

Is this the expected behaviour or have I set something up wrongly?

dave1010 avatar Dec 06 '13 13:12 dave1010

I think this behavior is the way this plugin works. It was not built with this many URLs in mind, I think. The maintainer should move the secure/unsecure external urls to a table. This will make lookups and storage much more scalable.

jorrit avatar Nov 01 '14 22:11 jorrit

The latest version (3.4.1) may address these issues, but I have not implemented the database caching in this version.

headstash avatar Jan 02 '18 04:01 headstash