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

Feature request: pause memory cleanup operations (minBidCacheTTL / eventHistoryTTL) while window is out of focus #11268

Open
spormeon opened this issue Mar 28, 2024 · 6 comments

Comments

@spormeon
Copy link

I'm more requlary seeing some prebid error for Error rendering ad (id: 2337c3ca576e2468): Cannot find ad '2337c3ca576e2468' and usually accompanied by this one: adRenderFailed (cannotFindAd). I'm thinking this is related to bidcache but not 100% sure, the oservation seems to be, load a page, navitage "off" page, leave for say 5 mins, go back to page an no ad will load. I think this is due to using a "reduced"TTL of e.g 180 from #10308 functionality. I'm using lazyload with "fetch", "render" and what I think is happening is, when going back to page the "fetch" is happening but "render" cant take place due to TTL expired, so the ad ID has been cleared out/ wiped out. Any way to either stop the "fetch" and/ or have the TTL "pause" while "off page", so TTL only "clocks down" when "on" an active page

p.s i'm not 100% sure this is whats actually happening 100% yet, but its my "best guess" so far

@dgirardi
Copy link
Collaborator

If a bid is past its TTL, is it still valuable to render it? I thought TTL meant "once it's this old, I won't pay for this impression".

@spormeon
Copy link
Author

if its "past", its gone, non payer etc but i'm thinking and not sure if its even possible, lets say the bid returned has TTL of 600, i'm setting minBidCacheTTL:180, this 180 starts from when bid retunred? but if someone navigates away from page, then back on page 4 mins later the 180TTL has gone but prebid seems to be trying to still "render" it or at least looking for it and throwing this error, could the minBidCacheTTL:180 take into account "off page time", so only counts down on "live" page?

@dgirardi
Copy link
Collaborator

with minBidCacheTTL set to 180, a bid that has TTL of 30 is discarded after 180 seconds; a bid that has TTL of 600 is discarded after 600 seconds (with the caveat that TTL also includes the TTL buffer).

It's plausible that if the window went out of focus in between an auction and the ad render, the ad render may happen after the TTL expired. I think it'd be possible to "pause" the TTL in that case. But I'm not sure it makes sense, I'd expect the buyer to not pay for it.

@dgirardi dgirardi changed the title potential problem with bibcache TTL &/or use of #10308, with "fetch", "render" lazyload Feature request: pause memory cleanup operations (minBidCacheTTL / eventHistoryTTL) while window is out of focus Mar 28, 2024
@spormeon
Copy link
Author

spormeon commented Mar 28, 2024

the "standard"that come back are
banner: 600
native: 300
video: 3600
so my 180 is way below the lowest native 300, so there is a 2 min "buffer" there still for it to be a "live" ad

and/ or i suppose another idea is "split" the minBidCacheTTL into banner, native, video, so can "control" each one

@dgirardi
Copy link
Collaborator

Again, if minBidCacheTTL is set to 180 but the bid expires after 300, it's discarded after 300. minBidCacheTTL is the minimum time bids should be kept in the cache. The issue you're describing can still happen if the window stays out of focus for 300 seconds.

@spormeon
Copy link
Author

ah ha, i got my min from my expired to my expired + min highly confused, my problems not my min then , doh!

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

No branches or pull requests

2 participants