mvied / wordpress-https

WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
http://wordpress.org/extend/plugins/wordpress-https/
95 stars 41 forks source link

Heavy update query for wp_options key wordpress-https_path_cache causes high SQL transaction log growth #64

Open jormaster3k opened 6 years ago

jormaster3k commented 6 years ago

Hi,

I have a very active WP running WordPress 4.9.4 with WordPress HTTPS 3.4.0. Yesterday we started seeing the MySQL transaction log on our server grow rapidly due to a number of extremely heavy update queries to the wp_options table (queries in excess of 3 million characters). We did not notice any increase in hit count or change in pattern to the hit count.

Here is an example of the query (highly truncated because of extreme length).

UPDATE wp_options SET option_value = a:63889:{s:19:\"/category/featured/\";i:0 {truncated} WHERE option_key = 'wordpress-https_path_cache'

It looks like this might be caused by the update in lib/WordPressHTTPS.php:install():

$this->setSetting('path_cache', $this->_settings['path_cache'], $blog_id);

I can clear the cache from the admin panel, but the size of the database entry continues to grow drastically.

I am looking to determine exactly what this function is doing, and why it seems to be causing such heavy update queries. I have disabled the plugin until I am able to find out more information

Thanks, Jory

headstash commented 6 years ago

@jormaster3k Sorry I couldn't get back to you sooner. Approximately how many pages does your website have? I believe there are some major issues I need to work out on multisites and very large sites. Thanks!

ajaegers commented 5 years ago

Hello @mvied is it still planned to fix this issue? Thanks

TheRealKingS commented 5 years ago

Here is the same issue. The entry in the database is 15MB big.

ajaegers commented 5 years ago

Hello, this issue is really annoying and stress MySql servers on shared hosting. Did you planned to fix it? Thanks

nnimis commented 4 years ago

Hi all, this is blowing up many websites, is there any workaround or a fix planned?

lkraav commented 4 years ago

I'm just seeing reading about this issue now, and obviously storing such a huge cache in an option is a super bad strategy.

But I think it should be fairly trivial to drop this plugin from your stack by now. Everything should be converted to HTTPS permanently instead. Do each of you know exactly why you're still running this plugin?

nnimis commented 4 years ago

I know how to live without this plugin and move to .htaccess config, I hate having too much plugins actually, but every other week a client calls me telling that the website went down. Until figuring out that it was because of this terrible query we may have spent several hours already.

damonsomu commented 2 years ago

I just figured our this was causing my site slow as its making the wp_options table heavier. It can be solved(If you have wp_options in MyISAM) by clearing/purging the SSL cache in the plugin settings page and then optimizing the table. But it's not a solution, rather than a temporary fix. I will be switching to .htaccess redirection to HTTPS.

dikkied commented 2 years ago

Sorry to drag this up, but I found the solution to my problems here (growing wp_options in db).

I was wondering. If I remove the https wordpress plugin and add those lines in my htaccess, will everything within wordpress be forced through https, even old http links & images and such?