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

make ajax timeout configurable #7382

Closed
spormeon opened this issue Sep 3, 2021 · 14 comments · Fixed by #9578
Closed

make ajax timeout configurable #7382

spormeon opened this issue Sep 3, 2021 · 14 comments · Fixed by #9578

Comments

@spormeon
Copy link

spormeon commented Sep 3, 2021

i'm seeing this warning, is prebid trying to store to the video cache even when there is no bid or something?

{
    "eventType": "auctionDebug",
    "args": {
        "type": "WARNING",
        "arguments": {
            "0": "Failed to save to the video cache: Error: Error storing video ad in the cache: : {}. Video bid must be discarded."
        }
    },

and this error, which i think is related to above but cant 100% tell, is this the error out of the inability to store a "empty" to the video cache?

{
    "eventType": "auctionDebug",
    "args": {
        "type": "ERROR",
        "arguments": {
            "0": "  xhr timeout after ",
            "1": 3000,
            "2": "ms"
        }
    },

If i've got this right, shouldn't it just ignore these "empty/ no bids" and NOT try to store in cache?

DevTools_-niketalk_com__and_New_Issue·_prebid_Prebid_js

@gglas
Copy link

gglas commented Sep 13, 2021

Hey @spormeon this is indeed a bit of a vague error, looking at the code there can be a couple of explanations. Given the timeouts, it could be network related, but we can't be certain without a test page -- is there something you could provide that creates the error and would allow us to have a closer look?

@spormeon
Copy link
Author

@gglas you on the adops slack channels, rather DM you test pages etc

@bretg
Copy link
Collaborator

bretg commented Sep 13, 2021

I have a test page that returns no-bids doesn't attempt to call /cache. Is this still happening? 'xhr timeout' seems to indicate server or network issue.

@bretg
Copy link
Collaborator

bretg commented Sep 13, 2021

I got the test page from David via AdOps slack and while I don't see the XHR cancelled error, I do regularly see VAST-size errors: adap.tv (via 33across) is returning VAST sizes > 100kB, but AppNexus' Prebid Cache rejects anything more than 40kB.

Will bring this up in the video and PBS meetings this week:

  1. is 100kB a normal size for VAST or is this an aberration? There are a huge number of URLs in this VAST and they're very long.
  2. is APN willing to reconsider the size of supported cache entries?

@bretg
Copy link
Collaborator

bretg commented Sep 20, 2021

Here's the Magnite data for entries in PBC of type "xml"

90th Percentile 57224 bytes
95th Percentile 63843 bytes
99th Percentile 106674 bytes
mean SIZE = 23883 bytes
median SIZE = 13177 bytes
max SIZE = 299929 bytes
min SIZE = 851 bytes

Based on this, it seems to me that 100kB would be pretty defensible -- it's probably around 98th-percentile.

But if a host company didn't want to support the 98th, they could take their pick. I assume that what's most important here from a scaling perspective is the mean size, which is ~23kB.

@spormeon
Copy link
Author

was there any word from APN on this?

@bretg
Copy link
Collaborator

bretg commented Oct 28, 2021

Discussed VAST sizing with the video committee. With no additional data, at this point we're planning to post an outline of the above data with a general recommendation for a cache size of 100KB.

APN hasn't weighed in yet on whether they're going to change their current limit.

@mansinahar
Copy link

mansinahar commented Nov 5, 2021

Here's the Xandr/Appnexus data for the current PBC payload size:

75th Percentile: ~15 KB
95th Percentile: ~32-50 KB (varying across regions)
99th Percentile: ~95-105 KB (varying across regions)
999th Percentile: ~128 KB. We do see p999 going up to 210 KB in the Europe region.

We're working to see if we can update the size limit and what that new size limit would be.

@spormeon
Copy link
Author

any update?

@spormeon
Copy link
Author

seeing more and more of these 3secs timeouts again, as well as a size limit is there an actual timelimit as well orf 3 secs, cant this 3 secs be pushed back to 5?

@bretg
Copy link
Collaborator

bretg commented Dec 18, 2021

We discussed this in a recent Prebid Server committee meeting. PBS-Go will change the limit from 40KB pre-compression to something somewhat higher post-compression,

As for timeout, I suppose a publisher configurable PBJS client-side caching setting wouldn't hurt. Not clear to me you really want to wait longer because 3 seconds indicates a server-tier problem anyhow. If anything, I would think that pubs might want to lower the default. But that's up to them. Will convert this issue into that enhancement request.

@bretg bretg changed the title prebid events warnings/ errors make ajax timeout configurable Dec 18, 2021
@bretg
Copy link
Collaborator

bretg commented Dec 18, 2021

In ajax.js there's a line with a hard-coded timeout:

export function ajaxBuilder(timeout = 3000, {request, done} = {}) {

@bretg bretg added the feature label Jan 4, 2022
@renebaudisch
Copy link
Contributor

When will this 40kb limit be removed/extended?

@mansinahar
Copy link

@spormeon @renebaudisch FYI: The AppNexus limit has bee adjusted to allow 128kb

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

Successfully merging a pull request may close this issue.

6 participants