You need to sign in to do that
Don't have an account?

Callout governor limits
Is there a easy way to test the following governor limits
A callout request to a given URL is limited to a maximum of 20 simultaneous requests.
Each organization is allowed 10 synchronous concurrent events, each not lasting longer than 5 seconds. If additional requests are made while 10 requests are running, it is denied.
I want to hit this governor limits with a small piece of code or by calling a sample service..
Thanks in advance.
Hi,
Total number of callouts in a request is 10 not 20. So you cannot send more that 10 requests at a time. Here is the code to hit this limit easily:
for(integer i=0;i<11;i++)
{
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();
req.setEndpoint('http://api.linkedin.com/v1/people/%7E');
req.setMethod('POST');
req.setBody('');
req.setCompressed(true); // otherwise we hit a limit of 32000
try
{
res = http.send(req);
}
catch(System.CalloutException e)
{
System.debug('@@@Callout error: '+ e);
System.debug(res.toString());
}
system.debug('@@@____successfull');
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks for you reply Ankit,
I am aware of that limit and that is not what I am looking for..
I am not able to understand the below two governor limits that are posted on salesforce limits page http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
I have the similar curiosity. What is exactly meant by simultaneous requests. I also want to understand how is it mapped to users.
For e.g. by having more users in an org who lead to issuing more no. of callout requests ( code is optimized in the sense for a user, we are never sending more than 10 callouts at once.) how wil lit hit that limit. I haven't been able to understand if 20 different users causing callouts call at the sametime can cause this limit to be hit.
I even checked the debug logs for all the API request and response timestamp. I could see at one point where 14 calls outs are actually waiting for the response from the API but still the governor limit is not hit. Any help here would be appreciated.