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

Auction timeout not respected on subsequent requestBids calls

Open gramorris opened this issue 10 years ago • 4 comments

Type of issue

Bug

Description

When calling requestBids multiple times it appears that the request timeout is being respected on the first call but not on subsequent. This is resulting in auctions ending after a tenth of a second, with usually no bids received back in that time, and then the bids coming in after the auction has been cleared.

Steps to reproduce

The easiest way is onsite. This url is a total debug so triggers everything: http://www.hitc.com/en-gb/2016/12/01/bobby-soldado-helped-harry-kane-star-at-tottenham/?hitc_debug=true&pbjs_debug=true

There should be 3 requestBid calls. The first is fine but then looking at our timings you get lines like: --- PERF Processing ad queue --- 3608.870000000001

--- PERF Bids back div-gpt-ad-97576-0,div-gpt-ad-4741-0,div-gpt-ad-90243-0,div-gpt-ad-62109-0,div-gpt-ad-82657-0 --- 3797.9200000000005

That's an auction completed in less than 2 tenths of a second when the timeout we have set is 1200. The bids then start coming in after the auction has cleared.

MESSAGE: Prebid auction cleared MESSAGE: Emitting event for: auctionEnd MESSAGE: JSONP callback function called for ad ID: 128fa5950a14d968 MESSAGE: Emitting event for: bidResponse MESSAGE: JSONP callback function called for ad ID: 124e509f814902d9 MESSAGE: Emitting event for: bidAdjustment MESSAGE: Emitting event for: bidResponse MESSAGE: JSONP callback function called for ad ID: 127856473f922fe5 MESSAGE: Emitting event for: bidAdjustment MESSAGE: Emitting event for: bidResponse MESSAGE: JSONP callback function called for ad ID: 125963111342aa43 MESSAGE: Emitting event for: bidAdjustment

Expected results

You can see the difference between versions by loading the page without ?hitc_debug (although you lose the timing log). We would expect to see 1200 seconds between auction start and end with bids in between

--- PERF PreBid loaded --- 341.33000000000004

--- PERF Bids back div-gpt-ad-94568282-0,div-gpt-ad-94568280-0 --- 1789.9

Platform details

All versions since 12 show this behaviour.

Other information

PR #484 detailed the bug where calling requestBids multiple times was failing - it was fixed in v12 but we're seeing the behaviour above in versions following.

It's possible that the refresh example in the docs is displaying the same behaviour as all I get from the refresh button is the house ad. http://prebid.org/dev-docs/examples/adunit-refresh.html

gramorris avatar Dec 02 '16 13:12 gramorris

@gramorris Thanks for the bug report. This should be fixed in master now. Can you check if it fixes your use case?

mkendall07 avatar Dec 06 '16 21:12 mkendall07

Yep looks fixed @mkendall07 . Thanks. Is the fix in the 0.16 release, I could only see a commit to package.json after it was released?

gramorris avatar Dec 07 '16 11:12 gramorris

@mkendall07 Which commit was that? Is that part of 0.16.0?

kasparsd avatar Dec 07 '16 17:12 kasparsd

Yes, the commit a6a90fd is in 0.16.0 release. Closing as fixed, thanks for reporting and confirming fix.

protonate avatar Dec 07 '16 18:12 protonate