What is the maximum properties size in Google Apps Script?

筅森魡賤 提交于 2020-06-27 08:45:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!