3

I'm using the Salesforce SOAP API on our website. I am only using it for read operations on a table with around 50,000 records, however I only return one or two rows from the table (which I am limiting using the SOQL query).

Our use of the SOAP API on our website is so that people can search the database for salespeople in the area, and there could be hundreds of people searching on the site at once. Am I correct in thinking:

1) Query Cursor Limit: This is limited at 10, but because I'm only returning one or two records from the query I shouldn't be using up any query cursors? These only get spun up when you are returning more rows that can be returned in a single call (500 I think?). If I have a few hundred people hitting search using the same account in the backend, if I'm just returning one or two rows that shouldn't be an issue?

2) Concurrent API Requests: These seem to only be a concern for queries that take over 20 seconds to operate.

Is this correct?

Thanks

3

From Salesforce Limits Quick Reference Guide - API Query Cursor Limits

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. If the client application attempts to open the released query cursor, an error results.

So the cursors are a rolling limit where only the 10 most recent are kept for a user.

Also, if the QueryResult.queryLocator is null you haven't consumed one. In my testing when QueryResult.done was true with the first QueryResult there was no queryLocator defined.


As you point out, Concurrent API Request will only be an issue if they take longer than 20 seconds.

You are more likely to run into the rolling 24 hour API limit that depends on how many seats you have. See Total API Request Limits.

| improve this answer | |
  • Querylocater is null for me, so that seems like it's working great. Cheers! – Jimmy JimJim Mar 20 '15 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.