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

prebid server timing out is firing prebid timeout ( which is the client side timeout)

Open spormeon opened this issue 1 year ago • 9 comments

Type of issue

bug/ potential enhancement

Description

I'm testing a hybrid system of client and s2s, I have a timeout set for the client side of e.g 2800, this is then sent as the timeout for s2s with "timeout * 0.50", so s2s timeout is 1400. When ever a timeout is reached and fired by s2s its getting reported back as "prebid timeout after 2800", which is actually the client side timeout not the s2s timeout. I'm not sure if this is expected behaviour or not, seems to me it should be reporting backthe s2s timeout of 1400 as thats the tmaxrequest: 1400.

Enhancement would be to fire back the tmaxrequest: 1400 and maybe even the bidder name etc, if its a bug and should already be firing back the s2s timeout, i got no clue whats happening

Steps to reproduce

DevTools_-headphones-pohs_com_akg-k240-mkii-superior-comfort-and-sound-for-studio-professionals

DevTools_-headphones-pohs_com_akg-k240-mkii-superior-comfort-and-sound-for-studio-professionals

Assertive_Yield_🔊

Expected results

the s2s timing out to be firing the s2s timeout

Actual results

s2s timing out is firing the client side timeout

Platform details

P9.15.0, chrome, firefox, mac

spormeon avatar Oct 03 '24 08:10 spormeon

smile wanted timed out, why wouldnt you expect their timeout event to fire?

patmmccann avatar Oct 03 '24 17:10 patmmccann

I would but i'd expect the prebid server timeout to fire, not the "overall"/ prebid client side timeout to fire. You can see the prebid server timeout is 1400 in the screenshot but 2800 is fired by the event

spormeon avatar Oct 03 '24 17:10 spormeon

noting the place in the code https://github.com/prebid/Prebid.js/blob/22aa7ce4566aa53ef4976fbe462aadf1abe425dc/src/ajax.js#L11

not sure exactly what the contents of the timeout event are in this scenario. It seems we should consider more verbose messages.

I don't see any handling in the https://github.com/prebid/Prebid.js/blob/22aa7ce4566aa53ef4976fbe462aadf1abe425dc/modules/prebidServerBidAdapter/index.js file to fire timeout events for the timed out server side bidders. Are you sure it was only smilewanted that times out in your example?

It seems we should have some sort of event for s2s timeouts but I'm not sure we have one. Perhaps the PBS_ANALYTICS event could include the timeout info?

patmmccann avatar Oct 07 '24 15:10 patmmccann

Assuming we need an event for this, there are three possibilities to debate:

a new event modify existing timeout event modify existing pbs_analytics event (https://github.com/prebid/Prebid.js/pull/12044/)

patmmccann avatar Oct 07 '24 15:10 patmmccann

Ye, was only smilewanted that timed out, I tested it so other S2S bidders timeout and that's what always fires the current event "Request timeout after Xms"

spormeon avatar Oct 08 '24 17:10 spormeon

@spormeon - we discussed in the Prebid Server committee meeting.

  1. Client-side analytics adapters can get server-side bidder timeout details by supplying ext.prebid.returnallbidstatus:true. e.g.:
s2sConfig: {
   ...
   extPrebid: {
     returnallbidstatus: true
   }
}

This will cause PBS to return extra details about what happened for each bidder as described in https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#seat-non-bid

This info is passed into the PBS_ANALYTICS event. That's missing documentation -- will add it.

bretg avatar Oct 09 '24 16:10 bretg

Ye, was only smilewanted that timed out, I tested it so other S2S bidders timeout and that's what always fires the current event "Request timeout after Xms"

@spormeon We're not able to reproduce, but we do plan some additional server side timeout information. Did pbs also respond late?

If you can reproduce, can you show all the output on the pbjs.onEvent using pbjs.onEvent('bidderTimeout', function () { console.log....

patmmccann avatar Oct 09 '24 16:10 patmmccann

@bretg I have that set already, @patmmccann there isnt a "bidderTimeout" event, prebid is telling me it dont exist, so which do you need?

spormeon avatar Oct 09 '24 16:10 spormeon

@spormeon - added the pbsAnalytics event to https://docs.prebid.org/dev-docs/publisher-api-reference/getEvents.html

So here's how I think it should work:

  1. Listen for the bidTimeout event to find out when Prebid Server as a whole timed out.
  2. Listen for the pbsAnalytics event and pull out seatnonbid code 101 to learn which bidders didn't bid because of timeout.

If it's not working this way, please show us a trace as @patmmccann suggests?

bretg avatar Oct 09 '24 19:10 bretg

Is there any action to take here?

dgirardi avatar Aug 25 '25 15:08 dgirardi