Open jskrivseth opened 4 years ago
@voodoodrul I'm not able to reproduce this issue currently. It might have been a temporary service issue, although I didn't hear of anything systemic. If you are still observing the error please let us know. BTW I suggest please upgrade to the latest SDK, although since you are using v13 anyways this is probably unrelated to the issue you observed.
@eric-urban This has been a problem for over a year and a half and continues to be a problem today. We've simply been wrapping all API calls in a retry middleware to eventually become successful. It may be related to rate limiting, or clustering of requests around the same time, but I have seen it happen when only one request from a given IP hits the endpoint at a given time.
You can see counts of how often this has happened for us in the last 30 days
@voodoodrul
You mentioned it might be related to TLS. Please also note we had communicated the TLS change 2.5 years ago e.g., here:
https://docs.microsoft.com/en-us/archive/blogs/bing_ads_api/mandatory-upgrade-required-to-tls1-2
I suggest please double check TLS requirements.
@eric-urban We're using the default settings of the SDK so it should be negotiating TLS 1.2 automatically. I'm not sure off-hand how to verify this. We are using OpenSSL 1.1.1 11 Sep 2018
and appears to support TLS 1.2. Even so, the fact that it's intermittent is the weird part..
@eric-urban Do you have any further investigation or guidance on this? Our solution at the moment is to wrap all calls to the Bing API in a huge number of retries, and eventually it becomes successful. It seems to be related to load balancing and quotas, since we hit the API fairly hard around the same time for multiple accounts. Do you know what the quotas are? We'll need to come up with a distributed throttle mechanism to slow down all the workers to stay under the threshold, but that's the only working theory I have right now.
One of the calls we don't have wrapped in a retry is pulling reports, which throws:
SoapFault exception: [s:Server] Invalid client data. Check the SOAP fault details for more information. TrackingId: 91320240-c27a-4302-b0ff-6dee16b50c2a
I'll add the SoapFault details as soon as I capture them
@voodoodrul I suggest troubleshooting the invalid client data separate from the SSL error. Regarding invalid client data yes please share the SOAP request, response, and timestamp if available.
Running on PHP 7.3, using
"microsoft/bingads": "v0.12.13.6"
we hit this error constantly, at random, when doing aSearchAccounts
requestI would say this works a little more than 50% of the time. The rest of the time, we receive
SoapClient::__doRequest(): SSL: Connection reset by peer
I'm guessing it's related to TLS version, but that's a shot in the dark