API-Access impossible

97 views
Skip to first unread message

quaylar

unread,
Apr 30, 2009, 7:01:52 AM4/30/09
to AdWords API Forum
Hello all,

I wrote and im still maintaining an ASP.NET application that is
holding the adwords-campaigns of various customers in a database, and
synchronizing them with Google in regular intervals.
This has been working almost flawless for a few months now,
nevertheless, within the last 2-3 weeks my client got timeouts from
time to time when starting sync, and since day before yday, he has not
been able at all to synchronize his campaigns anymore.

He is maintaining 2 master-accounts, and accessing several accounts
through them. From time to time he is getting a timeout-exception that
says smthing like "A connection that was expected to be established
was closed", for both master-accounts.

Yday he got an exception saying "An existing connection was forcibly
closed by the remote host" for both master-accounts, he kept trying
and was able to synchronize one of them.
Although the other one remains showing this exception, and in addition
sometimes shows a "Error 502 - Bad gateway" error page.

The client says, the synchronisation of this one master-account,
usually takes 1,5-2h, could this be the reason? Is there any timeout
on Google's side that is resetting the connection after this amount of
time?
Is there any hit-limit on the API, any max. usage-time at once etc,
that could cause such a behaviour?

Problem is, that this one master-account has many customers underneath
it which need to be synchronized with Google and whose ads need to be
activated.

Any help would be very much appreciated!

best regards,

--qu

AdWords API Advisor

unread,
Apr 30, 2009, 11:47:57 AM4/30/09
to AdWords API Forum
Hello Quaylar,

If the individual API calls you're making taking an exceedingly long
time to complete, then yes, it's possible that the AdWords API server
is closing the connection (and this may also manifest itself as the
502 - Bad Gateway errors). But they would have to be very long
operations, and chances are there's a more efficient way of doing what
you're trying to do.

You mention 1.5 to 2 hours to complete the full sync, but which
individual AdWords API calls are you making? How long does it take the
longest individual call to complete (or how long elapses between the
start of the call and the timeout error)?

Also, I wanted to bring your attention to some of the material linked
to in this thread:

http://groups.google.com/group/adwords-api/browse_thread/thread/7859807aa0ce22b8#

including some settings that are supposed to help the .NET runtime
handle HTTP connections more robustly.

Cheers,
-Jeff Posnick, AdWords API Team

quaylar

unread,
Apr 30, 2009, 12:23:00 PM4/30/09
to AdWords API Forum
Hello Jeff,

Thank u very much for your answer, i will try to give u more detailed
information.
As i stated before, the whole sync is taking 1,5-2h usually, right now
this exception
occurs after abt 1h.
The point is, there is no single individual call to the API that is
supposed to take a long time.
Due to the nature of this application, i was not able to make API
calls, passing in arrays of objects, but
rather had to pass each object in a separate API-Call.
Im aware of the fact, that passing in arrays, saves lots of protocol-
overhead, but it would require me to
rewrite parts of the application. Moreover i guess _then_ the
possibilty for long individual API-Calls would
increase.

However as i said, there are not really long API-Calls, im not
generating reports, im just adding/deleting/modifying
campaigns/ad-groups/ads/keywords.
Nothing else.

So i guess the duration of individual calls cant be a problem here -
is there any other possible reason?
I will check out the information in the link provided, thanks so far
Jeff.

regards,

--qu

On 30 Apr., 17:47, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Hello Quaylar,
>
>  If the individual API calls you're making taking an exceedingly long
> time to complete, then yes, it's possible that the AdWords API server
> is closing the connection (and this may also manifest itself as the
> 502 - Bad Gateway errors). But they would have to be very long
> operations, and chances are there's a more efficient way of doing what
> you're trying to do.
>
>  You mention 1.5 to 2 hours to complete the full sync, but which
> individual AdWords API calls are you making? How long does it take the
> longest individual call to complete (or how long elapses between the
> start of the call and the timeout error)?
>
>  Also, I wanted to bring your attention to some of the material linked
> to in this thread:
>
>  http://groups.google.com/group/adwords-api/browse_thread/thread/78598...

quaylar

unread,
May 5, 2009, 5:11:41 AM5/5/09
to AdWords API Forum
Hi again Jeff,

Unfort. i wasnt able to resolve this issue so far.
Is it possible for Adwords Support, to check their logs regarding the
"api hit-limit" that was mentioned
by you in one of the linked threads?
It would be of great help to know, whether the connection was really
reset on Google's side, or
whether something else is the problem here.
I'd gladly email you the email-adresses of the accounts that are
accessed here, so u can check your logs regarding
any error-messages.

regards,

--qu

AdWords API Advisor

unread,
May 6, 2009, 10:58:51 AM5/6/09
to AdWords API Forum
Hello Qu,

If you could give me some more information about your requests I
could do some spot checks in the production logs--I'm not sure that
anything conclusive will turn up, but I'll see. Either a requestId
from the SOAP response header of a successful request, or the customer
id number of your MCC account should give me enough info about your
account to find your requests.

Cheers,
-Jeff Posnick, AdWords API Team

quaylar

unread,
May 7, 2009, 4:38:09 PM5/7/09
to AdWords API Forum, AdWords API Advisor
Hello Jeff,

I appreciate your help, thank you very much.
I just sent an email to adwordsa...@google.com with my MCC
customer-id.

best regards,

--qu

On 6 Mai, 16:58, AdWords API Advisor <adwordsa...@google.com>
wrote:
> Hello Qu,
>
>  If you could give me some more information about your requests I
> could do some spot checks in the production logs--I'm not sure that
> anything conclusive will turn up, but I'll see. Either a requestId
> from the SOAP response header of a successful request, or the customer
> id number of your MCC account should give me enough info about your
> account to find your requests.
>
> Cheers,
> -Jeff Posnick,AdWordsAPI Team
>
> On May 5, 5:11 am, quaylar <che...@gmx.net> wrote:
>
> > Hi again Jeff,
>
> > Unfort. i wasnt able to resolve this issue so far.
> > Is it possible forAdwordsSupport, to check their logs regarding the
> > > On 30 Apr., 17:47,AdWordsAPI Advisor <adwordsapiadvi...@google.com>
> > > wrote:
>
> > > > Hello Quaylar,
>
> > > >  If the individual API calls you're making taking an exceedingly long
> > > > time to complete, then yes, it's possible that theAdWordsAPI server
> > > > is closing the connection (and this may also manifest itself as the
> > > >502-BadGatewayerrors). But they would have to be very long
> > > > operations, and chances are there's a more efficient way of doing what
> > > > you're trying to do.
>
> > > >  You mention 1.5 to 2 hours to complete the full sync, but which
> > > > individualAdWordsAPI calls are you making? How long does it take the
> > > > longest individual call to complete (or how long elapses between the
> > > > start of the call and the timeout error)?
>
> > > >  Also, I wanted to bring your attention to some of the material linked
> > > > to in this thread:
>
> > > >  http://groups.google.com/group/adwords-api/browse_thread/thread/78598...
>
> > > > including some settings that are supposed to help the .NET runtime
> > > > handle HTTP connections more robustly.
>
> > > > Cheers,
> > > > -Jeff Posnick,AdWordsAPI Team
>
> > > > On Apr 30, 7:01 am, quaylar <che...@gmx.net> wrote:
>
> > > > > Hello all,
>
> > > > > I wrote and im still maintaining an ASP.NET application that is
> > > > > holding theadwords-campaigns of various customers in a database, and
> > > > > synchronizing them with Google in regular intervals.
> > > > > This has been working almost flawless for a few months now,
> > > > > nevertheless, within the last 2-3 weeks my client got timeouts from
> > > > > time to time when starting sync, and since day before yday, he has not
> > > > > been able at all to synchronize his campaigns anymore.
>
> > > > > He is maintaining 2 master-accounts, and accessing several accounts
> > > > > through them. From time to time he is getting a timeout-exception that
> > > > > says smthing like "A connection that was expected to be established
> > > > > was closed", for both master-accounts.
>
> > > > > Yday he got an exception saying "An existing connection was forcibly
> > > > > closed by the remote host" for both master-accounts, he kept trying
> > > > > and was able to synchronize one of them.
> > > > > Although the other one remains showing this exception, and in addition
> > > > > sometimes shows a "Error502-Badgateway" error page.

Pazcal

unread,
May 11, 2009, 4:19:27 AM5/11/09
to AdWords API Forum
Hi Jeff and Qu,

The reason why I'm react is because I'm running into the same
problems. Since I've updated to API v13, I'm having the same errors.

Only the strangest thing I have is, it isn't happening every time...
We are running our tool every night at 04.00 GMT +1. Sometimes the
tool completes his task with no error or disconnection at all, but
there are also some night when the error popups with the message "An
existing connection was forcibly closed by the remote host"

I don't know if you already have more information about this problem
and how to solve this.

My situation is exactly the same as jeff: a ASP.NET tool, with just
some small add, edit or deleting requests.

Regards,

Pazcal


On 7 mei, 22:38, quaylar <che...@gmx.net> wrote:
> Hello Jeff,
>
> I appreciate your help, thank you very much.
> I just sent an email to adwordsapiadvi...@google.com with my MCC
> customer-id.
>
> best regards,
>
> --qu
>
> On 6 Mai, 16:58, AdWords API Advisor <adwordsapiadvi...@google.com>

AdWords API Advisor

unread,
May 11, 2009, 3:43:19 PM5/11/09
to AdWords API Forum
Hello Pazcal,

I've been speaking to Qu offthread and gathering some additional
data, but no, there is not currently any indication as to what the
cause or resolution is.

If you happen to have a SOAP log of a request that resulted in a
disconnection, feel free to pass it along to the email address
mentioned above. I'd need to see the full request, including some
header information that you shouldn't post in this public discussion
group.

Cheers,
-Jeff Posnick, AdWords API Team


Pazcal de Jonge

unread,
May 12, 2009, 5:01:58 AM5/12/09
to adwordsa...@google.com, adwor...@googlegroups.com
Hi Jeff,

Thnx for you answer so far. As I suspected, our tool did a good job this morning. It has run completely without any disconnections.
About the SOAP log; I have enabled the SOAP log file from now on. As soon as our tool runs into a forcibly closed connection, I will send you the log.

Cheerz

Paz


> Date: Mon, 11 May 2009 12:43:19 -0700
> Subject: AdWords API Re: API-Access impossible
> From: adwordsa...@google.com
> To: adwor...@googlegroups.com

AdWords API Advisor

unread,
May 18, 2009, 10:28:28 AM5/18/09
to AdWords API Forum
Just to follow up on this publicly: if anyone using one of the .NET
languages has seen an increase in "An existing connection was forcibly
closed by the remote host." exceptions, could you try disabling the
"Expect: 100-continue" header in your HTTP requests, as described at

http://blogs.msdn.com/joncole/archive/2005/09/08/462659.aspx
http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx

I'm not recommending that everyone go out and do this if your .NET
SOAP requests are currently fine. When troubleshooting the issue Qu
was having, making that change did prevent those particular errors but
led to a different occurrence of 502/503 HTTP response errors. I'm
just trying to gather some anecdotal evidence from people who might
have been experiencing recent problems with .NET to see if this makes
a difference. If it does, I'll have some data to bring to the folks in
charge of our HTTP servers.

Cheers,
-Jeff Posnick, AdWords API Team


On May 12, 5:01 am, Pazcal de Jonge <pdj_ru...@hotmail.com> wrote:
> Hi Jeff,
>
> Thnx for you answer so far. As I suspected, our tool did a good job this morning. It has run completely without any disconnections.
> About the SOAP log; I have enabled the SOAP log file from now on. As soon as our tool runs into a forcibly closed connection, I will send you the log.
>
> Cheerz
>
> Paz
>
>
>
> > Date: Mon, 11 May 2009 12:43:19 -0700
> > Subject: AdWords API Re: API-Access impossible
> > From: adwordsapiadvi...@google.com
> _________________________________________________________________
> Nieuws, entertainment en de laatste roddels. Je vind het op MSN.nl!http://nl.msn.com/

quaylar

unread,
May 26, 2009, 4:52:30 AM5/26/09
to AdWords API Forum
Hello Jeff,

Just wanted to let u know, that the errors have not occured for 2
weeks now.
Apart from this change concerning the "Expect: 100-continue" header i
havent changed
anything in my code.
Anyways, this change did not seem to do the trick, since a different
type of error occured aftwards.

I dont really know why it is working now, but lets hope it will stay
like that :)
Thanks for your efforts!

regards,

--qu

On 18 Mai, 16:28, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Just to follow up on this publicly: if anyone using one of the .NET
> languages has seen an increase in "An existing connection was forcibly
> closed by the remote host." exceptions, could you try disabling the
> "Expect: 100-continue" header in your HTTP requests, as described at
>
>  http://blogs.msdn.com/joncole/archive/2005/09/08/462659.aspx
>  http://msdn.microsoft.com/en-us/library/system.net.servicepointmanage...
> > > > problems. Since I've updated toAPIv13, I'm having the same errors.
>
> > > > Only the strangest thing I have is, it isn't happening every time...
> > > > We are running our tool every night at 04.00 GMT +1. Sometimes the
> > > > tool completes his task with no error or disconnection at all, but
> > > > there are also some night when the error popups with the message "An
> > > > existing connection was forcibly closed by the remote host"
>
> > > > I don't know if you already have more information about this problem
> > > > and how to solve this.
>
> > > > My situation is exactly the same as jeff: a ASP.NET tool, with just
> > > > some small add, edit or deleting requests.
>
> > > > Regards,
>
> > > > Pazcal
>
> > > > On 7 mei, 22:38, quaylar <che...@gmx.net> wrote:
>
> > > > > Hello Jeff,
>
> > > > > I appreciate your help, thank you very much.
> > > > > I just sent an email to adwordsapiadvi...@google.com with my MCC
> > > > > customer-id.
>
> > > > > best regards,
>
> > > > > --qu
>
> > > > > On 6 Mai, 16:58,AdWordsAPIAdvisor <adwordsapiadvi...@google.com>
> > > > > wrote:
>
> > > > > > Hello Qu,
>
> > > > > >  If you could give me some more information about your requests I
> > > > > > could do some spot checks in the production logs--I'm not sure that
> > > > > > anything conclusive will turn up, but I'll see. Either a requestId
> > > > > > from the SOAP response header of a successful request, or the customer
> > > > > > id number of your MCC account should give me enough info about your
> > > > > > account to find your requests.
>
> > > > > > Cheers,
> > > > > > -Jeff Posnick,AdWordsAPI Team
>
> > > > > > On May 5, 5:11 am, quaylar <che...@gmx.net> wrote:
>
> > > > > > > Hi again Jeff,
>
> > > > > > > Unfort. i wasnt able to resolve this issue so far.
> > > > > > > Is it possible forAdwordsSupport, to check their logs regarding the
> > > > > > > "apihit-limit" that was mentioned
> > > > > > > by you in one of the linked threads?
> > > > > > > It would be of great help to know, whether the connection was really
> > > > > > > reset on Google's side, or
> > > > > > > whether something else is the problem here.
> > > > > > > I'd gladly email you the email-adresses of the accounts that are
> > > > > > > accessed here, so u can check your logs regarding
> > > > > > > any error-messages.
>
> > > > > > > regards,
>
> > > > > > > --qu
>
> > > > > > > On 30 Apr., 18:23, quaylar <che...@gmx.net> wrote:
>
> > > > > > > > Hello Jeff,
>
> > > > > > > > Thank u very much for your answer, i will try to give u more detailed
> > > > > > > > information.
> > > > > > > > As i stated before, the whole sync is taking 1,5-2h usually, right now
> > > > > > > > this exception
> > > > > > > > occurs after abt 1h.
> > > > > > > > The point is, there is no single individual call to theAPIthat is
> > > > > > > > supposed to take a long time.
> > > > > > > > Due to the nature of this application, i was not able to makeAPI
> > > > > > > > calls, passing in arrays of objects, but
> > > > > > > > rather had to pass each object in a separateAPI-Call.
> > > > > > > > Im aware of the fact, that passing in arrays, saves lots of protocol-
> > > > > > > > overhead, but it would require me to
> > > > > > > > rewrite parts of the application. Moreover i guess _then_ the
> > > > > > > > possibilty for long individualAPI-Calls would
> > > > > > > > increase.
>
> > > > > > > > However as i said, there are not really longAPI-Calls, im not
> > > > > > > > generating reports, im just adding/deleting/modifying
> > > > > > > > campaigns/ad-groups/ads/keywords.
> > > > > > > > Nothing else.
>
> > > > > > > > So i guess the duration of individual calls cant be a problem here -
> > > > > > > > is there any other possible reason?
> > > > > > > > I will check out the information in the link provided, thanks so far
> > > > > > > > Jeff.
>
> > > > > > > > regards,
>
> > > > > > > > --qu
>
> > > > > > > > On 30 Apr., 17:47,AdWordsAPI Advisor <adwordsapiadvi...@google.com>
> > > > > > > > wrote:
>
> > > > > > > > > Hello Quaylar,
>
> > > > > > > > >  If the individualAPIcalls you're making taking an exceedingly long
> > > > > > > > > > Is there any hit-limit on theAPI, any max. usage-time at once etc,

quaylar

unread,
May 28, 2009, 5:46:07 AM5/28/09
to AdWords API Forum
And to follow up on this once more:

For 2 days now im getting a "A connection that was expected to be
established was closed by the server"-Webexception..*sigh*
Is Google doing any kind of maintainance atm?
> ...
>
> Erfahren Sie mehr »
Reply all
Reply to author
Forward
0 new messages