503 Error while trying to issue GAM commands

487 views
Skip to first unread message

Stephen Newman

unread,
Feb 21, 2012, 9:22:57 AM2/21/12
to Google Apps Manager
Error while trying to issue GAM commands

Description: Receiving following message while trying to issue
delegation commands using .bat file. Receiving message intermittently
when using line command.

Traceback (most recent call last):
File "gam.py", line 3138, in <module>
File "gam.py", line 242, in doDelegates
File "gdata\apps\emailsettings\service.pyo", line 311, in
CreateDelegate
File "gdata\apps\service.pyo", line 532, in _PostProperties
gdata.apps.service.AppsForYourDomainException: {'status': 503, 'body':
'Quota ex
ceeded for the current request', 'reason': 'Service Unavailable'}



Google Suggested: If the errors are intermittent then they should
handle these by implementing an exponential backoff algorithm or
multiple batch files.



The command being used is just a simple:

GAM USER A150200 DELEGATE TO Jim.Green

It works sporadically. At first it was working fine now it keeps
intermittently returning errors. Only one delegate is being added to
users. Has anyone had experience with the 503 errors?

Jay Lee

unread,
Feb 21, 2012, 9:28:58 AM2/21/12
to google-ap...@googlegroups.com
Have you tried this with GAM 2.2 which was just released yesterday? GAM 2.2 should delay between delegations in order to prevent this issue.

Jay



--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to
google-apps-man...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

Steve Newman

unread,
Feb 21, 2012, 9:54:19 AM2/21/12
to google-ap...@googlegroups.com
Thanks for the suggestion, I will give that a shot

Steve Newman

unread,
Mar 6, 2012, 6:16:32 PM3/6/12
to google-ap...@googlegroups.com
I tried with 2.2 and now with 2.3 and still seeing the error.  Any other thoughts?

On Tue, Feb 21, 2012 at 9:28 AM, Jay Lee <jay...@gmail.com> wrote:

Paul Robson

unread,
Mar 7, 2012, 7:27:42 AM3/7/12
to Google Apps Manager
I am also getting these errors with both 2.2 and 2.3 and therefore
unable to make changes to groups.

Paul

On Mar 6, 11:16 pm, Steve Newman <steve.m.new...@gmail.com> wrote:
> I tried with 2.2 and now with 2.3 and still seeing the error.  Any other
> thoughts?
>
>
>
>
>
>
>
> On Tue, Feb 21, 2012 at 9:28 AM, Jay Lee <jay0...@gmail.com> wrote:
> > Have you tried this with GAM 2.2 which was just released yesterday? GAM
> > 2.2 should delay between delegations in order to prevent this issue.
>
> > Jay
>

Paul Robson

unread,
Mar 16, 2012, 8:19:25 AM3/16/12
to google-ap...@googlegroups.com
Does anyone have any advise on how to troubleshoot why this is happening and what is causing the issues?

Many thanks

Paul
> >> To unsubscribe from this group, send email to
> >> For more options, visit this group at
> >>https://groups.google.com/forum/#!forum/google-apps-manager
>
> >  --
> > You received this message because you are subscribed to the "Google Apps
> > Manager" group.
> > To post to this group, send email to
> > To unsubscribe from this group, send email to

Jay Lee

unread,
Mar 16, 2012, 8:52:53 AM3/16/12
to google-ap...@googlegroups.com
Hi Paul,

  You said you were getting the errors with groups. What GAM commands were you running? If you're trying to do group settings did you follow the special instructions at:


Are the errors sporadic (works sometimes, fails others) or constant?

Regards,

Jay Lee
LCS Deployment Lead  | Dito
(267) 712-9533
j...@ditoweb.com






To unsubscribe from this group, send email to

Paul Robson

unread,
Mar 16, 2012, 9:00:30 AM3/16/12
to google-ap...@googlegroups.com
PS C:\gam> $list = import-csv groups050312.csv
PS C:\gam> foreach ($entry in $list)
>> {
>> .\gam.exe update group $($entry.GroupID) settings is_archived true
>> .\gam.exe update group $($entry.GroupID) settings message_moderation_level mo
derate_all_messages
>> .\gam.exe update group $($entry.GroupID) settings show_in_group_directory tru
e
>> echo $($entry.GroupID)
>> }
>>
Traceback (most recent call last):
  File "gam.py", line 3461, in <module>
  File "gam.py", line 1840, in doUpdateGroup
  File "gdata\apps\groupsettings\service.pyo", line 162, in update_group_setting
s
  File "gdata\service.pyo", line 1394, in Put
  File "gdata\service.pyo", line 1357, in PostOrPut
gdata.service.RequestError: {'status': 503, 'body': '<?xml version="1.0" encodin
g="UTF-8"?>\n<errors xmlns="http://schemas.google.com/g/2005">\n <error>\n  <dom
ain>GData</domain>\n  <code>backendError</code>\n  <internalReason>Backend Error
</internalReason>\n </error>\n</errors>\n', 'reason': 'Service Unavailable'}
PS C:\gam>

I sometimes (but not every time) get the first group through the commands, but then it fails.
When I very first ran it it worked for around 20 groups before stopping.

I have followed the instructions in the Wiki and have access to the groups API.  I have also tried regenerating the OAuth file.

Paul
Paul
> >> For more options, visit this group at
> >>https://groups.google.com/forum/#!forum/google-apps-manager
>
> >  --
> > You received this message because you are subscribed to the "Google Apps
> > Manager" group.
> > To post to this group, send email to
> > google-apps-manager@googlegroups.com
> > To unsubscribe from this group, send email to
> > For more options, visit this group at
> >https://groups.google.com/forum/#!forum/google-apps-manager

Paul Robson

unread,
Mar 21, 2012, 1:35:01 PM3/21/12
to google-ap...@googlegroups.com
Jay,

  Is there anything else I can be doing to help track down why this error is occurring?  Would I have more success if I worked out how to directly access the API through Python or Java? I have avoided this route so far as GAM does everything I need much simpler without the need for me to learn how to program the API.

Many thanks

Paul

Paul Robson

unread,
Apr 9, 2012, 10:36:17 AM4/9/12
to google-ap...@googlegroups.com
I have now found a work-around to this issue to stop the 503 errors occurring.
It depends on the order in which the commands are issued and they need to be run in seperate scripts with about a minutes delay between them:
1. show_in_groups_directory true
2. is_archived_true
3. message_moderation_level moderate_all_messages

An alternative solution (which I haven't tested but lead to the above) is to manually make a change in the admin panel on the group prior to using it with the API.  It therefore appears there is a restriction on the API commands which can be issued to new groups.

I hope that this helps some others as it appears the issue is quite common.

Paul

Aaron Thompson

unread,
Apr 9, 2012, 11:06:48 AM4/9/12
to google-ap...@googlegroups.com
Paul,

I have been fighting this a bit too...  I've been pushing membership out with GADS, and settings with GAM... I've had no delays in accessing groups after they were making and got frustrated to the point of asking support about this late last week. Here is what I got back from support:

Thanks for reaching out to us regarding this issue with the Groups Settings API.  As discussed in our Help Center (https://developers.google.com/google-apps/groups-settings/limits), the 503 response from the server almost always indicates that you are running up against an API quota limit.  In this case, you should automatically back off and retry your calls (using an exponential backoff algorithm) until the calls proceed once again.

Personally I have been finding that the exponential back-off with a cap of 5 retries has almost eliminated the problem for me, but there are still times when either things are that busy, or I'm unlucky enough to keep calling at the wrong time.

@


To unsubscribe from this group, send email to

For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager



--
Aaron Thompson
Senior System Admin/Application Admin/DBA
ITS - Information Systems
University of Northern Iowa

Message has been deleted

Gary Chapman

unread,
Apr 10, 2012, 8:43:28 AM4/10/12
to google-ap...@googlegroups.com
I'm getting this error consistently ( 'reason': 'Service Unavailable') for every group I create with GAM. Create group, add owner, then fail with any setting -- although it did work once last week!  Retrying after delays is having no effect for me. But I find that I only have to look up the group in the Admin Console and click on access settings (don't have to set anything) for the GAM-issued commands to then work nicely.  Unfortunately getting info about the group and its settings via GAM doesn't have the same effect! This is completely untenable.  

- Gary Chapman, New York University
Reply all
Reply to author
Forward
0 new messages