Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

make ajax timeout configurable

Open spormeon opened this issue 4 years ago • 14 comments

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

spormeon avatar Sep 03 '21 08:09 spormeon

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?

gglas avatar Sep 13 '21 15:09 gglas

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

spormeon avatar Sep 13 '21 15:09 spormeon

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 avatar Sep 13 '21 15:09 bretg

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 avatar Sep 13 '21 17:09 bretg

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.

bretg avatar Sep 20 '21 17:09 bretg

was there any word from APN on this?

spormeon avatar Oct 20 '21 20:10 spormeon

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.

bretg avatar Oct 28 '21 17:10 bretg

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.

mansinahar avatar Nov 05 '21 13:11 mansinahar

any update?

spormeon avatar Nov 24 '21 12:11 spormeon

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?

spormeon avatar Dec 18 '21 13:12 spormeon

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 avatar Dec 18 '21 14:12 bretg

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

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

bretg avatar Dec 18 '21 14:12 bretg

When will this 40kb limit be removed/extended?

renebaudisch avatar Feb 18 '22 15:02 renebaudisch

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

mansinahar avatar Feb 22 '22 19:02 mansinahar