Running out of Memory getting all Shared Drive ACLs

226 views
Skip to first unread message

Iain Macleod

unread,
Jul 21, 2022, 11:21:13 AM7/21/22
to GAM for Google Workspace
Currently Running:
GAMADV-XTD3 6.24.25 - https://github.com/taers232c/GAMADV-XTD3 - pyinstaller
Ross Scroggs <ross.s...@gmail.com>
Python 3.10.5 64-bit final
Windows 10 10.0.19042 SP0 Multiprocessor Free AMD64

I am going through the process of removing any shares to a certain external Domain from my domains Google Drive.  I already completed the "My Drive" space using GetSharedExternallyDriveACLs.py and am now working through the GetSharedExternallyTeamDriveACLs.py

I got to the point where I need to run the command to retrieve all the ACL's from the Shared Drives using the following command:

gam redirect csv ./filelistperms.csv multiprocess csv ./TeamDriveOrganizers.csv gam user "~organizers" print filelist select teamdriveid "~id" fields teamdriveid,id,name,permissions

But I keep running into the following error: 

ERROR: GAM has run out of memory. If this is a large Google Workspace instance, you should use a 64-bit version of GAM on Windows or a 64-bit version of Python on other systems.

Exception in thread Thread-1 (accepter):
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "multiprocessing\managers.py", line 194, in accepter
  File "threading.py", line 935, in start
RuntimeError: can't start new thread
ERROR: [WinError 121] The semaphore timeout period has expired

 
I am using the 64 bit version and I have tried reducing the number of Shared Drives in the TeamDriveOrganizers.csv significantly but still seem to be running into the error. Has anyone had any luck running this command on around 750 Shared Drives? 
 

Ross Scroggs

unread,
Jul 21, 2022, 11:24:50 AM7/21/22
to google-ap...@googlegroups.com
Iain,

The only files we need are those shared to the external domain, use permission matching to filter the list.

gam redirect csv ./filelistperms.csv multiprocess csv ./TeamDriveOrganizers.csv gam user "~organizers" print filelist select teamdriveid "~id" fields teamdriveid,id,name,permissions pm domain externaldomain.com em

Ross


Notice to recipient: This e-mail is only meant for the intended recipient of the transmission, and may be a confidential communication or a communication privileged by law. If you received this e-mail in error, any review, use, dissemination, distribution, or copying of this e-mail is strictly prohibited. Please notify us immediately of the error by return e-mail and please delete this message from your system. Thank you in advance for your cooperation.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/4d3c0e34-bfae-48ea-bcd7-8c7501f6f35an%40googlegroups.com.


--

Iain Macleod

unread,
Jul 21, 2022, 11:35:28 AM7/21/22
to google-ap...@googlegroups.com
Thank you Ross!



You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/HcTex6Pia3c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS8i3A77YjnwVAf19QVg5hbw-FMjB9SMmfe59r6fxveO-w%40mail.gmail.com.


--

Iain Macleod

Sr. Google Workspace Administrator 

Irvine Company

101 Innovation | Irvine | California | 92617

Phone 949.720.2389 

imac...@irvinecompany.com


Reply all
Reply to author
Forward
0 new messages