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
rajaraodv100rajaraodv100 

Getting Http 500 Timeout even for basic SOAP calls against enterprise accounts

I am making basic calls via soap but getting http 500 - timeout.Is anyone experiencing it? 
 
<?xml version="1.0" encoding="utf-8" ?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope
/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
><soap:Header><sh:QueryOptions xmlns:sh="SoapService" soap:mustUnderstand="0"><sh:batchSize xmlns:sh
="urn:enterprise.soap.sforce.com">200</sh:batchSize></sh:QueryOptions><sh:SessionHeader xmlns:sh="urn
:enterprise.soap.sforce.com"><sh:sessionId xsi:type="xsd:string">00D300000000NRG!ARgAQFTiQnwOlKGx.LBOA5KcYZpk8s1meB3_QFDiIHbekuI
.oOR9XpCTelPEULbDUcY08q_hzBAJu8rawGs5y5heELgCnHV3</sh:sessionId></sh:SessionHeader></soap:Header><soap
:Body><query xmlns="urn:enterprise.soap.sforce.com"><queryString xmlns="" xmlns:sh="urn:enterprise.soap
.sforce.com">Select t.Subject ,t.Status ,t.CreatedDate ,t.ActivityDate ,t.Id ,t.AccountId ,t.OwnerId
from Task t</queryString></query></soap:Body></soap:Envelope>
werewolfwerewolf
You appear to be trying to retrieve all Task records.  That could be a very big table depending on the size of your org.  Try adding a where clause that restricts it to Tasks created today, for example.
Lawrence-CECLawrence-CEC
We are getting a lot of "Error Fetching http headers" and a few "SERVER_UNAVAILABLE: server temporarily unavialable" [sic] errors yesterday and today (using the PHP soap library). Not sure if those are 500 timeouts but I'm guessing they likely are. And by "a lot" I'm talking 7 errors like that from around perhaps 1000 to 2000 requests in the last 48 hours. Not a ton, but a lot more than the one or two errors we normally see in two or three months time.

This is with queries like:


SELECT (SELECT Id, ActivityDate, ActivityType, Subject, Description from ActivityHistories) FROM Contact WHERE Contact.Email = '<email>'


so I don't think it's a quantity thing.


-L
Message Edited by Lawrence-CEC on 01-05-2010 01:37 PM
rajaraodv100rajaraodv100
The thing that puzzles me is that how come Salesforce's own UI work even for the same query(at least logically speaking).
ccusic1ccusic1
This is a timeout error on the SFDC side.  To fix this issue you could:
  1. Include a LIMIT clause to limit the amount of records (maybe you only need 1)
  2. Use indexed fields in your where clause to limit the results to what you need.  
  3. Increase your timeout on your SOAP API calls
The reason that it works in the UI and not workbench could be:
  • SFDC has a different timeout set
  • Less latency between the SFDC servers and your server