Bing Ads API: Error Fetching http headers

Hots Hots 1 Reputation point
2021-06-11T16:01:51.04+00:00

We are using the PHP library.
Now there is a problem with several calls to the API in a short period of time, we get this error.
After investigation, it turned out that the bing server randomly does not have time or does not close a connection after a call although 'keep_alive' => FALSE.
As a solution, after each API call, we refresh the ServiceClient, which creates a new SOAPClient.
We never had such problems before.
Are there any ideas? Why 'keep_alive' => FALSE does not always work, although we have been using the PHP library for 2 years and everything was fine?

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
429 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Eric Urban - MSFT 626 Reputation points Microsoft Employee
    2021-07-05T22:48:04.693+00:00

    @Hots Hots - Apologies for the delay. This should have been resolved mid-June. Please let me know if that's not the case.

    0 comments No comments

  2. Josh 0 Reputation points
    2023-06-02T11:01:19.7933333+00:00

    Hi @Eric Urban - MSFT , I am also facing this issue when using the PHP CampaignManagementV13 service. This error will intermittently appear when using several calls to the Campaign Management Service Operations. Do I need to create a new SoapClient connection every time I use the campaign operations?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.