Salesforce API 10 请求限制

发布于 2024-11-04 06:07:30 字数 767 浏览 0 评论 0原文

我在某处读到 Salesforce API 有 10 个请求限制。如果我们编写代码来与 Salesforce 集成: 1、这个限额有什么风险 2. 我们如何编写代码来消除这种风险?

我真正担心的是,我不想为我们的客户构建这个与 Salesforce 集成的出色独立网站,只是为了让用户 11 和 12 被踢出,等待请求 1-10 完成?

编辑: 有关限制细节的更多详细信息,请访问 http: //www.salesforce.com/us/developer/docs/api/Content/implementation_considerations.htm。查看标题为“限制”的部分。

限制 用户可以同时执行的查询数量是有限制的。用户一次最多可以打开 10 个查询游标。如果当以同一用户身份登录的客户端应用程序尝试打开新游标时打开了 10 个 QueryLocator 游标,则将释放 10 个游标中最旧的游标。这会导致客户端应用程序出现错误。 多个客户端应用程序可以使用相同的用户名参数登录。但是,这会增加由于查询限制而出现错误的风险。 如果多个客户端应用程序使用同一用户登录,则它们都共享同一个会话。如果客户端应用程序之一调用 logout(),则会使所有客户端应用程序的会话无效。对每个客户端应用程序使用不同的用户可以更轻松地避免这些限制。*”

I read somewhere that the Salesforce API has a 10 request limit. If we write code to integrate with Salesforce:
1. What is the risk of this limit
2. How can we write code to negate this risk?

My real concern is that I don't want to build our customer this great standalone website that integrates with Salesforce only to have user 11 and 12 kicked out to wait until requests 1-10 are complete?

Edit:
Some more details on the specifics of the limitation can be found at http://www.salesforce.com/us/developer/docs/api/Content/implementation_considerations.htm. Look at the section titled limits.

"Limits
There is a limit on the number of queries that a user can execute concurrently. A user can have up to 10 query cursors open at a time. If 10 QueryLocator cursors are open when a client application, logged in as the same user, attempts to open a new one, then the oldest of the 10 cursors is released. This results in an error in the client application.
Multiple client applications can log in using the same username argument. However, this increases your risk of getting errors due to query limits.
If multiple client applications are logged in using the same user, they all share the same session. If one of the client applications calls logout(), it invalidates the session for all the client applications. Using a different user for each client application makes it easier to avoid these limits.*"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

故事还在继续 2024-11-11 06:07:30

不确定您指的是哪个限制,但调控器限制是所有内容都列在 Apex 文档中。这些限制适用于在给定 Apex 事务中运行的代码(即响应触发器/Web 服务调用等),因此添加更多用户不会对您造成伤害 - 每个事务都有自己的资源分配。

对长时间运行的并发 API 请求数和 API 调用总数也有限制一天。其中大多数都是按许可证计算的,因此,随着用户数量的增加,限制也会增加。

Not sure which limit you're referring to, but the governor limits are all listed in the Apex documentation. These limits apply to code running in a given Apex transaction (i.e. in response to a trigger/web service call etc), so adding more users won't hurt you - each transaction gets its own allocation of resources.

There are also limits on the number of long-running concurrent API requests and total API calls in a day. Most of these are per-license, so, again, as the number of users rises, so do the limits.

意犹 2024-11-11 06:07:30

很少有评论:

我不想为我们的客户构建这个与 Salesforce 集成的出色独立网站,只是为了让用户 11 和 12 被踢出,等待请求 1-10 完成?

在规划实时 Sfdc 集成时,除了 metadaddy 的答案中提到的 api 调用限制之外,您还需要考虑两件主要事情(如果您做了很多查询很容易达到这些限制):

  1. Sfdc 有例行维护中断期。
  2. 查询 Sfdc 总是比查询本地数据源显着慢。

您可能需要考虑 Sfdc 数据的本地镜像,您可以在其中复制 Sfdc 数据。

干杯,
泰梅克

Few comments on:

I don't want to build our customer this great standalone website that integrates with Salesforce only to have user 11 and 12 kicked out to wait until requests 1-10 are complete?

There are two major things you need to consider when planning real-time Sfdc integration beside the api call limits mentioned in the metadaddy's answer (and if you make a lot of queries it's easy to hit these limits):

  1. Sfdc has routine maintainance outage periods.
  2. Querying Sfdc will always be significantly slower than a querying local datasource.

You may want to consider a local mirror of you Sfdc data where you replicate your Sfdc data.

Cheers,
Tymek

几味少女 2024-11-11 06:07:30
  • 所有 API 使用限制均在 24 小时内计算。
  • 限制适用于整个组织。因此,如果您有多个用户通过 API 连接,那么所有用户都将计入相同的限制。
  • 每个 Salesforce 用户会收到 1,000 个 API 请求。即使是无限版实际上也仅限于 5,000 个。
  • 如果您想检查当前 API 使用状态,请转到您的姓名 |
    设置|公司简介 |公司信息
  • 您可以购买额外的 API 调用

您可以在 Salesforce API 限制文档

  • All API usage limits are calculated over 24 hours period
  • Limits are applicable to whole organization. So if you have several users connecting through API all of them count against the same limit.
  • You get 1,000 API requests per each Salesforce user. Even Unlimited Editions is actually limited to 5,000.
  • If you want to check your current API usage status go to Your Name |
    Setup | Company Profile | Company Information
  • You can purchase additional API calls

You can read more at Salesforce API Limits documentation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文