WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 17 months ago

#33970 new defect (bug)

Huge inflation of post_meta for oEmbed caches

Reported by: whyisjake Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Embeds Keywords: reporter-feedback close
Focuses: Cc:

Description

This is a follow-up to #17210.

@tollmanz and I are seeing a huge inflation on post_meta as a result of oEmbed caches. It seems like the caching only comes from saving posts, so maybe stampedes aren't totally at fault, but might be an issue. Any ideas here? Going to dig in on this.

Change History (9)

#1 @whyisjake
3 years ago

What @markjaquith [notes here](https://core.trac.wordpress.org/ticket/14759#comment:49) is that What this doesn't address: that if you never update the post, the cache stays indefinitely. Which is definitely the case that we are seeing. The problem tho, is that we see the post has a bunch of seemingly unrelated {{unknown}} cached oembeds.

212813662 XXXXXXX _oembed_019482445bf6f815c668416775e9dcfd {{unknown}}
212813563 XXXXXXX _oembed_05b733c148b07e2d3f839a31a05ffd03 {{unknown}}
212813551 XXXXXXX _oembed_06333e71ec55ee07dd85d5dab47e9584 {{unknown}}
212813565 XXXXXXX _oembed_067fadb5312b1d7caaafb4cd3b1f40ad {{unknown}}
212813626 XXXXXXX _oembed_08e7890c32bc5f0d9616f5c5cbd13488 {{unknown}}
212813628 XXXXXXX _oembed_0f2fea88d5bc5965b3200003d12c1414 {{unknown}}
212813621 XXXXXXX _oembed_0fbba40c78a857cdde757499e842ac1b {{unknown}}
212813574 XXXXXXX _oembed_11c042cc437db317b3b3af8148d85ba5 {{unknown}}
212813653 XXXXXXX _oembed_11e89cd4ab6fb62368338cc9cdf4066a {{unknown}}
212813624 XXXXXXX _oembed_13a1c19c94d507117adb625fcce37f30 {{unknown}}
212813595 XXXXXXX _oembed_18e7578c7f1583cddef54aeaac503859 {{unknown}}
212813594 XXXXXXX _oembed_1a8fab22feac3da3e3aadbb238871943 {{unknown}}
212813655 XXXXXXX _oembed_1b39ee4c38d0683d5b90426cf1f711ba {{unknown}}
212813647 XXXXXXX _oembed_1d0743e42f2e5a7529898583b292f28f {{unknown}}
212813631 XXXXXXX _oembed_226f418793ee619cdd629328afa439aa {{unknown}}
212813567 XXXXXXX _oembed_25135b6200504f88346ad5a26e9addf6 {{unknown}}
212813636 XXXXXXX _oembed_25532f9c9a7911aa2324b2bd2734398d {{unknown}}
212813583 XXXXXXX _oembed_262652332f0e21d3a2e64d2aded1abd0 {{unknown}}
212813552 XXXXXXX _oembed_278a581de54f4fb3be04ba297ac03a8c {{unknown}}
212813660 XXXXXXX _oembed_2b14eca6e4d3837249ca8d1f0cc941cf {{unknown}}
212813599 XXXXXXX _oembed_2ca17fa661747ddb2c132867d9a5f0de {{unknown}}
212813570 XXXXXXX _oembed_2d2fff709e96cacc388b9a039fd359e6 {{unknown}}
212813613 XXXXXXX _oembed_2d419ac7ba5bf21c66acf356b33ebb73 {{unknown}}
212813557 XXXXXXX _oembed_2d46e3b3c383d8589b77907f57337d13 {{unknown}}
212813577 XXXXXXX _oembed_2d8cb422cc7510e48bb2401bcff06577 {{unknown}}
212813510 XXXXXXX _oembed_2fd986240c681e44bd9c5629eb3c6d42 <iframe width="500" height="281" src="https://www.youtube.com/embed/pKcJ-0bAHB4?feature=oembed" frameborder="0" allowfullscreen></iframe>
| 212813569| XXXXXXX _oembed_315d0449f8a3d2dedb44dac06abf0a4f {{unknown}}
212813654 XXXXXXX _oembed_3171236843b169f9868f21f22fffd369 {{unknown}}
212813607 XXXXXXX _oembed_345bca2898ff898e1c3824bf4713f556 {{unknown}}
212813566 XXXXXXX _oembed_3736276c9b1bb5e4fcadfc60e8cceef3 {{unknown}}
212813560 XXXXXXX _oembed_3b32c739ed5a71e15e8b18e9c570bce6 {{unknown}}
212813629 XXXXXXX _oembed_3c8d27f4596238c4b3c07655b9fc5e0e {{unknown}}
212813620 XXXXXXX _oembed_3f4b49fe0a26d22e977dd82f7e12319f {{unknown}}
212813601 XXXXXXX _oembed_409b1a5ffd3e5776a4bbc72ba0efa5a3 {{unknown}}
212813641 XXXXXXX _oembed_4500e22a64a5db5664a882f6fde6a923 {{unknown}}
212813575 XXXXXXX _oembed_49cb1728eb01181528a5d829a5a9cab6 {{unknown}}
212813571 XXXXXXX _oembed_4bb292aeca1d6c5c8096e2b69231647c {{unknown}}
212813588 XXXXXXX _oembed_4be491bba71069499ae68488fc7ad90d {{unknown}}
212813614 XXXXXXX _oembed_4e9fe148b1e732a279d401f94bb3daa7 {{unknown}}
212813596 XXXXXXX _oembed_55c635268acff81868cfc8b656a0fdb5 {{unknown}}
212813561 XXXXXXX _oembed_56aad46b19331d5ae91509c9b0ed0363 {{unknown}}
212813658 XXXXXXX _oembed_578850480ce954b8237c4a3001e10ac7 {{unknown}}
212813648 XXXXXXX _oembed_58d33a64abc80113d04cfb0aa2bb4599 {{unknown}}
212813559 XXXXXXX _oembed_5b76b33d1e0b4fb98c4f091c52bd1be4 {{unknown}}
212813649 XXXXXXX _oembed_5c8fc9cb618ac15b09dd5c5149229b08 {{unknown}}
212813615 XXXXXXX _oembed_6100f4da315e13b5077c436f9f16b6f3 {{unknown}}
212813652 XXXXXXX _oembed_65c4cc9bcaa6266d82b30dd2f517dd3f {{unknown}}
212813598 XXXXXXX _oembed_66f9e465b433fe989f9e2336b32cd2d9 {{unknown}}
212813622 XXXXXXX _oembed_68bc0d65c322ed094100f9da6a23d314 {{unknown}}
212813637 XXXXXXX _oembed_69f1ea06d08322e7f24e92f9d2b06948 {{unknown}}
212813640 XXXXXXX _oembed_6a43c9f6104e4bb06877297b9807cbdf {{unknown}}
212813572 XXXXXXX _oembed_6ab05d30680db2f8f2736306a6c60060 {{unknown}}
212813656 XXXXXXX _oembed_6b2fdd193936b03e61eeafe2a4776b8e {{unknown}}
212813554 XXXXXXX _oembed_6d4d9e8bee033cdebc4522f2db95eb76 {{unknown}}
212813568 XXXXXXX _oembed_726b879693a20c0a1faf17191be8f501 {{unknown}}
212813553 XXXXXXX _oembed_733d8db1e82bab273a464d0b329f9e5e {{unknown}}
212813650 XXXXXXX _oembed_747a754752d537e20bcf7f137043b8a0 {{unknown}}
212813603 XXXXXXX _oembed_75276fe25fa16591203b1664bceb23e8 {{unknown}}
212813590 XXXXXXX _oembed_754c24bd8f161ddfed16e48dc188d165 {{unknown}}
212813602 XXXXXXX _oembed_767251d09e1b0c1adb8299fa079f5be8 {{unknown}}
212813645 XXXXXXX _oembed_7ac21b99e774772a72962615255c99bf {{unknown}}
212813623 XXXXXXX _oembed_7d67911292af54d1ffbef10628d37607 {{unknown}}
212813663 XXXXXXX _oembed_804e6fddb6b8161e90ae41340e0cf3d2 <a data-flickr-embed="true" href="https://www.flickr.com/photos/59179465@n03/sets/72157625859691347/" title="Shanghai by 80m, on Flickr"><img src="https://farm6.staticflickr.com/5299/5420131532_0f66732cf6_n.jpg" width="320" height="240" alt="IMG_1864"></a><script async src="https://embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
212813633 XXXXXXX _oembed_810a78ebb34b2a43d2a2bdea04d37ec0 {{unknown}}
212813564 XXXXXXX _oembed_832a487bd385e982a45a35bd750ee77f {{unknown}}
212813556 XXXXXXX _oembed_8445df49d2f06ebe2cb17186e7ba5856 {{unknown}}
212813495 XXXXXXX _oembed_86d69d9afb69aa33130e9ebd9a7dd5c7 {{unknown}}
212813635 XXXXXXX _oembed_889614a734a7bd809c3c04c9dc2d5d37 {{unknown}}
212813597 XXXXXXX _oembed_91b420166abca23dafd0ec33b016aaf7 {{unknown}}
212813582 XXXXXXX _oembed_962b51118d7cda2cf255da3ed04041f3 {{unknown}}
212813646 XXXXXXX _oembed_99f136ae5b6b645d076e04b539a84e29 {{unknown}}
212813634 XXXXXXX _oembed_9c50cd161943413afe5527471fbfaed7 {{unknown}}
212813600 XXXXXXX _oembed_9e2ed787b6c53a9d116123a8cfb172c3 {{unknown}}
212813608 XXXXXXX _oembed_a162ce5fb22a4116aa40b0485e0d274d {{unknown}}
212813578 XXXXXXX _oembed_a21e006acbbb598e27b9f0b4dafd4fae {{unknown}}
212813617 XXXXXXX _oembed_a317a6ffcdde99bfd22cbdccff2ab433 {{unknown}}
212813591 XXXXXXX _oembed_a5f822d484fc010ca0a4ff5cb63f8c63 {{unknown}}
212813555 XXXXXXX _oembed_a996edc9dcda39b8e4b5186ff4626372 {{unknown}}
212813589 XXXXXXX _oembed_ab155330e11c75dee0495ad6ffa34e1f {{unknown}}
212813558 XXXXXXX _oembed_ac7cd3b324e594bcffc32b609ce72274 {{unknown}}
212813661 XXXXXXX _oembed_ad5604aee32ef5e7dd5935a793d00a65 {{unknown}}
212813593 XXXXXXX _oembed_b0eebf28b478cb3bec32f2c3ee86e417 {{unknown}}
212813579 XXXXXXX _oembed_b274dc0fda0114189c52192dfd763705 {{unknown}}
212813618 XXXXXXX _oembed_b474c6d5f583b3c649b0d66b6cc9c34d {{unknown}}
212813619 XXXXXXX _oembed_b5101c0c5c509875f9eeaa4ace6fd56e {{unknown}}
212813639 XXXXXXX _oembed_be319bd077ea34f52fede0f9cdc72543 {{unknown}}
212813632 XXXXXXX _oembed_c379af75555049e509cecd9225704cde {{unknown}}
212813627 XXXXXXX _oembed_cc10f88168d5b509105c5350ed249059 {{unknown}}
212813585 XXXXXXX _oembed_d2702a437bd8b305fc1b37e0322dd363 {{unknown}}
212813592 XXXXXXX _oembed_d2d1f1ef241851ad3f5c9c32df178b99 {{unknown}}
212813576 XXXXXXX _oembed_d41b548a1d0b7a685fb72a66056e403f {{unknown}}
212813562 XXXXXXX _oembed_d4adce7ecce0c5a44bfdc20e409d1eb0 {{unknown}}
212813609 XXXXXXX _oembed_d6981e1b821bf60f8fa19608ee5f77e6 <iframe src="https://player.vimeo.com/video/82404988" width="480" height="270" frameborder="0" title="Rudy Rucker interviewed by V. Vale for RESearch, Aug 29, 2013" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
212813581 XXXXXXX _oembed_d71bd7d82e514a645480092c4702ae8c {{unknown}}
212813584 XXXXXXX _oembed_d84ea344937ad54b43411362b815568a {{unknown}}
212813498 XXXXXXX _oembed_dc7ec700d3c5d8f542a75396c48483ba {{unknown}}
212813665 XXXXXXX _oembed_ddb8110a45f8abe4f0d3f52fdde2df8f {{unknown}}
212813651 XXXXXXX _oembed_de1e7a17b097b36017f7564636988b7f {{unknown}}
212813659 XXXXXXX _oembed_e09f12bea7018607c92d2a1a57d18797 {{unknown}}
212813630 XXXXXXX _oembed_e0eacbc1fd42db8d9930ccf5220ec5c3 {{unknown}}
212813638 XXXXXXX _oembed_e42372a87ac019fc1bf0cb1c53135ee5 {{unknown}}
212813606 XXXXXXX _oembed_e67c54e7522cf9d3c2ebda1797ddb155 {{unknown}}
212813573 XXXXXXX _oembed_e75c46e8175f417103f000dc9b2f483e {{unknown}}
212813657 XXXXXXX _oembed_e92a3736fbeed20d30a2cd29bac63dc7 {{unknown}}
212813587 XXXXXXX _oembed_eaa55a35087c3ca3a78795db6d4cb32c {{unknown}}
212813642 XXXXXXX _oembed_eb5e8a11b1900e5a73838bffe653650a {{unknown}}
212813644 XXXXXXX _oembed_ec339f70068a10e5f020aec3c91c0f8a {{unknown}}
212813612 XXXXXXX _oembed_f1552b43d58c4813bf7a92917698cba7 {{unknown}}
212813625 XXXXXXX _oembed_f19ad404e779f2810a51d25e23217734 {{unknown}}
212813580 XXXXXXX _oembed_f4fae2c2b68478b151ee643f4a06b162 {{unknown}}
212813643 XXXXXXX _oembed_f6bc9531d3417efb149ccd2e6a3daae8 {{unknown}}
212813611 XXXXXXX _oembed_f729439c520992349930b46da355e87b {{unknown}}
212813605 XXXXXXX _oembed_f895c18f48460ef5f70fafbf2db43a53 {{unknown}}
212813616 XXXXXXX _oembed_fbe4ba0d27296353981ef57b63943528 {{unknown}}
212813586 XXXXXXX _oembed_fc6a9cf9956076faafb731b8eafd1c65 {{unknown}}
212813511 XXXXXXX _oembed_time_2fd986240c681e44bd9c5629eb3c6d42 1442602924
212813664 XXXXXXX _oembed_time_804e6fddb6b8161e90ae41340e0cf3d2 1442603203
212813610 XXXXXXX _oembed_time_d6981e1b821bf60f8fa19608ee5f77e6 1442603194
Last edited 3 years ago by whyisjake (previous) (diff)

#2 follow-up: @helen
3 years ago

  • Version trunk deleted

@whyisjake Can you log the HTTP requests for these? You'll probably have to hook in somewhere that gets the $url and $attr so you can determine the key (oembed_result maybe), I'm not recalling anything that receives the key as context. If there are hooks or more context for hooks that we could use in core to better enable this, we can look at that too.

Still want to know what's going on, but maybe we could delete all the {{unknown}} responses on post save at least. I'll try to remember if there was a reason we didn't go that route when we made those changes in 4.0.

#3 follow-up: @Viper007Bond
3 years ago

Are you attempting to use the oEmbed functionality in a custom location, such as a sidebar widget? I wouldn't be surprised if this was a result of post ID pollution.

#4 in reply to: ↑ 3 @whyisjake
3 years ago

Replying to Viper007Bond:

Are you attempting to use the oEmbed functionality in a custom location, such as a sidebar widget? I wouldn't be surprised if this was a result of post ID pollution.

No, these are all in post content.

#5 in reply to: ↑ 2 @whyisjake
3 years ago

Replying to helen:

@whyisjake Can you log the HTTP requests for these? You'll probably have to hook in somewhere that gets the $url and $attr so you can determine the key (oembed_result maybe), I'm not recalling anything that receives the key as context. If there are hooks or more context for hooks that we could use in core to better enable this, we can look at that too.

Yeah, I can setup some logging. What is so strange to me is that the keys seem to be totally random. They don't match the results at all.

Still want to know what's going on, but maybe we could delete all the {{unknown}} responses on post save at least. I'll try to remember if there was a reason we didn't go that route when we made those changes in 4.0.

Yeah, it seems like it would be easy to hook into the delete cache method when saving a good response. I'll whip up .diff.

#6 @whyisjake
3 years ago

It looks like @nacin set it up to delete the cache on pre_post_update here: #22190 but this code was seem to be removed. Any ideas why that was changed? I'm looking for the change.

#7 @pavelevap
3 years ago

I noticed similar problem: #32553 But I did not have time to find out more...

#8 @swissspidy
2 years ago

  • Keywords reporter-feedback added

@whyisjake Is this bug still occuring?

Would be great to be able to reproduce and fix this.

#9 @swissspidy
17 months ago

  • Keywords close added
Note: See TracTickets for help on using tickets.