Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jormaster3k opened this issue Mar 8, 2018 · 9 comments

Comments

@jormaster3k
Copy link

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
Copy link
Collaborator

@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
Copy link

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

@TheRealKingS
Copy link

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

@ajaegers
Copy link

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

@nnimis
Copy link

nnimis commented May 26, 2020

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

@lkraav
Copy link

lkraav commented May 26, 2020

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
Copy link

nnimis commented May 26, 2020

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.

@headstash headstash removed their assignment May 26, 2020
@damonsomu
Copy link

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
Copy link

dikkied commented Jul 8, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants