function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
colingcoling 

Invalid API Responses from Salesforce

Hi,

My app, BizConnector (/Lead Follow-Up) is getting invalid error responses for some of its customers when it attempts to log in via the SOAP API. This app has been running since 2007 and successfully logs in on behalf of most of its customers 24/7 - and has been doing so for years. This kind of invalid response is only evident for a few customers, and has only started behaving like this recently.

One particular customer has a maximum quota of 15000 but is getting these error responses even though the actual API count is only in the hundreds. BizConnector counts API requests, and, for example shows the following counts over the last few days.

8/9 1157
8/10 836
8/11 984
8/12 836
8/13 113

A sample API request and response are below. This is clearly a Salesforce bug and needs to be fixed. 

last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:CallOptions><ns1:client>Expresiv/BizConnector</ns1:client><ns1:defaultNamespace xsi:nil="true"/></ns1:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns1:login><ns1:username>--username provided--</ns1:username><ns1:password>--password provided--</ns1:password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0 HTTP/1.1
Host: login.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 529


last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:REQUEST_LIMIT_EXCEEDED</faultcode><faultstring>REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>REQUEST_LIMIT_EXCEEDED</sf:exceptionCode><sf:exceptionMessage>TotalRequests Limit exceeded.</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


I look forward to prompt attention to this matter.

Colin Goldberg

James LoghryJames Loghry
Colin,

Salesforce has a finite limit of API Requests based on the number of User Licenses purchased for that organization.  This API Request limit applies across the board, not only to incoming requests from your BizConnector calls.  The API Request limit is a rolling 24-hour limit, meaning that if I used up all the requests in the past 24 hours, I'll have to wait until the next top of the hour to see if it receeds or not. 

You can check your current API limit status by going to Setup->Company Information->Company Profile, and it will tell you how many requests you are allotted and how many requests are used up.  

For more information on the API Request Limit see the following document: http://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm
colingcoling
I am well aware of API rate limiting, and have catered for it in my app. In this particular case, BizConnector is the only app that accesses this customer, as seen in the 'API Calls Made Within Last 7 Days' report below (identity of customer not included here). As you can see, the numbers are nowhere near the limit. In addition, the Company Information page even shows that they have not reached their limit. But notice that this count (14749) does not agree with the API Usage report above - something is wrong here! Based on both the above displays (accessed around the time the error response was received), the error should not have been generated. I expect that you can see from the above that there is a problem in how Salesforce is responding to the login request. Colin Goldberg
colingcoling
My comment above was sent by email with two inline snapshot images showing the Company Information API count and limit, as well as the API Usage Report for the Last 7 Days - both not shown above (I guess they were stripped ). So I am including the information below in text format (information same as in the snapshots).

[Snapshot from API Usage Report]
Client Id - Day of Week - Call Count
Expresiv/BizConnector - Monday - 1026
Expresiv/BizConnector - Tuesday - 839
Expresiv/BizConnector - Wednesday - 211
Expresiv/BizConnector - Thursday - 1174
Expresiv/BizConnector - Friday - 1166
Expresiv/BizConnector - Saturday - 1150
Expresiv/BizConnector - Sunday - 813

[Snapshot from Company Information]
API Requests, Last 24 Hours 14,749 (15,000 max)

I hope this helps.

Colin Goldberg

colingcoling
No response - yet. Looks like this Salesforce bug is not going to be resolved soon.

Colin Goldberg