{"id":1916,"date":"2009-12-22T15:56:18","date_gmt":"2009-12-22T10:56:18","guid":{"rendered":"http:\/\/www.chiragmehta.info\/chirag\/?p=1916"},"modified":"2009-12-22T15:59:40","modified_gmt":"2009-12-22T10:59:40","slug":"salesforce-web-service-callout-timeouts","status":"publish","type":"post","link":"https:\/\/www.chiragmehta.info\/chirag\/2009\/12\/22\/salesforce-web-service-callout-timeouts\/","title":{"rendered":"Salesforce Web service Callout Limits(Timeouts)"},"content":{"rendered":"<p>The following limits apply when an Apex script makes a callout to an<strong> HTTP request or a Web services call<\/strong>. The Web services call can be a Force.com Web Services API call or any external Web services call.<\/p>\n<ol>\n<li>A single Apex transaction can make a maximum of 10 callouts to an HTTP request or an API call.<\/li>\n<li>The default timeout is 10 seconds. A custom timeout can be defined for each callout. The minimum is 1 millisecond and the maximum is 60 seconds. See the following examples for how to set custom timeouts for Web Services or HTTP callouts.<\/li>\n<li>The maximum cumulative timeout for callouts by a single Apex transaction is 120 seconds. This time is additive across all callouts invoked by the Apex transaction.<\/li>\n<\/ol>\n<p>The following is an example of setting a custom timeout for <strong>Web services callouts<\/strong>:<\/p>\n<blockquote><p>docSample.DocSamplePort stub = new docSample.DocSamplePort();<br \/>\nstub.timeout_x = 2000; \/\/ timeout in milliseconds <\/p><\/blockquote>\n<p>The following is an example of setting a custom timeout for <strong>HTTP callouts<\/strong>:<\/p>\n<blockquote><p>HttpRequest req = new HttpRequest();<br \/>\nreq.setTimeout(2000); \/\/ timeout in milliseconds <\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>The following limits apply when an Apex script makes a callout to an HTTP request or a Web services call. The Web services call can be a Force.com Web Services API call or any external Web services call. A single Apex transaction can make a maximum of 10 callouts to an HTTP request or an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[169],"class_list":["post-1916","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-salesforce","post-preview"],"_links":{"self":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/comments?post=1916"}],"version-history":[{"count":4,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1916\/revisions"}],"predecessor-version":[{"id":1919,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1916\/revisions\/1919"}],"wp:attachment":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/media?parent=1916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/categories?post=1916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/tags?post=1916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}