423 Error rate increase




We noticed that since 4/19/2017 the Ads API was returning a high number of HTTP 423 errors. As a result quite a few of the campaigns that were setup on that date or updated after that date did not have their targeting set correctly.
Do you have any information on this issue? Is the Ads API undergoing maintenance or did the platform have some kind of limited outage?

Sample from our logs:

1 2017-04-21T16:03:23.759551+00:00 app twitter.2 - - [1m [33m twitter_ads_api - response (0.001894ms) [0m: type=response transaction=00173bce004b0228 method=post url=https://ads-api.twitter.com/1/accounts/xxxxx/targeting_criteria status=423 response_time=2109 runtime=2.094316
1 2017-04-21T16:03:24.146783+00:00 app twitter.2 - - [1m [33m twitter_ads_api - response (0.003398ms) [0m: type=response transaction=00f6c03f004a78bd method=post url=https://ads-api.twitter.com/1/accounts/xxxxx/targeting_criteria status=423 response_time=2108 runtime=2.098006
1 2017-04-21T16:03:24.305456+00:00 app twitter.2 - - [1m [33m twitter_ads_api - response (0.004251ms) [0m: type=response transaction=0038733100bd70c9 method=post url=https://ads-api.twitter.com/1/accounts/xxxxx/targeting_criteria status=423 response_time=2107 runtime=2.095972
1 2017-04-21T16:03:24.396514+00:00 app twitter.1 - - [1m [33m twitter_ads_api - response (0.005124ms) [0m: type=response transaction=00fe2eb3009f7074 method=post url=https://ads-api.twitter.com/1/accounts/xxxxx/targeting_criteria status=423 response_time=2112 runtime=2.103627

As you will noticed below, we are experiencing a sharp uptick – Is there a breaking change we need to be aware of?

Breakdown by Dates for HTTP 423 Errors:
2017-04-03 23:59:59 0
2017-04-06 04:05:03 0
2017-04-08 08:10:08 0
2017-04-10 12:15:13 61
2017-04-12 16:20:17 168
2017-04-14 20:25:22 0
2017-04-17 00:30:27 0
2017-04-19 04:35:32 164
2017-04-21 08:40:36 572
2017-04-23 12:45:41 433

Thank you!


Thanks for the question, @hyfn.

The 423 HTTP status code corresponds to the LOCK_ACQUISITION_TIMEOUT error code. This is more likely to happen when concurrent requests are made on the same ads account. Given this, we strongly encourage partners to use the POST batch/accounts/:account_id/targeting_criteria endpoint for adding targeting to campaigns.

We recently fixed an issue to correctly log this error. You may have previously seen a 5XX HTTP status code.


@hyfn: It’d be good to confirm what the actual error code you’re seeing is. Thanks!