An existing connection was forcibly closed by the remote host

638 views
Skip to first unread message

Caihua Du

unread,
Dec 7, 2016, 2:18:59 PM12/7/16
to AdWords API Forum
Hi AdWords team,

We encountered one issue during the Report download phase. It looks like the response from Adwords timeout during the download phase. In the request we already set the timeout value to 15 min, but still see this error, and the error is thrown within 15 min, so I am wondering if there is any other values controlled from the server side to override the value I set in the request?

System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 
    at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) 
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) 

Thanks,
Caihua.

Anthony Madrigal

unread,
Dec 7, 2016, 5:42:36 PM12/7/16
to AdWords API Forum
Hi Caihua,

This may be a network related issue on your side. Have you made any changes to the hosts where your app is deployed such as upgrading the .NET runtime recently or changing some values in your App.config/Web.config file?

Regards,
Anthony
AdWords API Team

Caihua Du

unread,
Dec 8, 2016, 1:19:32 AM12/8/16
to AdWords API Forum
Hi Anthony,

No, we didn't make changes to the deployment environment. This issue is not 100% repro, and if the download time is more than 5 min, the connection seems get force closed. Is this expected?

Thank you!
Caihua.

Caihua Du

unread,
Dec 8, 2016, 11:15:40 PM12/8/16
to AdWords API Forum
Hi Anthony,

Do you have any update? We saw new failures today in which the IO connection get terminated after 5 mins while we are downloading report file. Please let us know if this is expected or not. Thank you!

Caihua.

Anash P. Oommen (AdWords API Team)

unread,
Dec 9, 2016, 3:26:25 PM12/9/16
to AdWords API Forum
Hi Caihua,

Could you try increasing the timeout in the .NET client library using the Timeout setting in App.config? See https://github.com/googleads/googleads-dotnet-lib/wiki/Understanding-App.config#general-library-behavior for details.

The error you get could be due to a server somewhere up the chain (e.g. ISP) closing the connection midway, so trying out the same report download with a different machine / ISP is one way to troubleshoot the issue.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Caihua Du

unread,
Dec 12, 2016, 1:26:10 PM12/12/16
to AdWords API Forum
Thanks Anash, I will try this!
Reply all
Reply to author
Forward
0 new messages