问题
I am trying to store large number of key/value pairs in Google Apps script and it fails after a while. I am using this:
var properties = PropertiesService.getScriptProperties();
properties.setProperties(newProperties, false);
It works fine until around 10,000 and then it gets this:
Exception: Too many arguments provided. Expected: properties. at getGroups (GroupCache:77) at warmCache (GroupCache:133)
Is this the maximum size? If so, is there a way around this? I cannot use CacheService because there is no way to get all the values out (only retrieval is by key).
Thanks for any help.
回答1:
The page Quotas for Google Services states the following limits:
- Properties value size: 9kB per value
- Properties total storage: 500kB per property store
Additionally, there is a limit on the number of read/write operations per day: 50,000 for consumer accounts and 500,000 for G Suite Basic/Business/Edu/Gov.
A possible workaround is to use a spreadsheet to store data in. A spreadsheet can have up to 2,000,000 cells. A cell can hold a string up to 50,000 characters.
来源:https://stackoverflow.com/questions/41397711/what-is-the-maximum-properties-size-in-google-apps-script