Hi,
I'm using the web api and c#. Unfortunately, I get a timeout exception every time that I call FetchObjects() on a result set having hundreds of results.
This is a sample code I'm calling:
CommitCRM.ObjectQuery<CommitCRM.Account> accountSearch = new CommitCRM.ObjectQuery<CommitCRM.Account>();
accountSearch.AddCriteria(CommitCRM.Account.Fields .AccountNumber, CommitCRM.OperatorEnum.opEqual, number);
List<CommitCRM.Account> accounts = accountSearch.FetchObjects();
The last line of the previous code should return about 250 results, but instead it throws this timeout exception:
CommitCRM.Exception: Timeout dell'operazione.
in CommitCRM.CmtDbQryWebAPI.APICall(String sFileName, String sRequest, String& sResponse, Int32& nStatus) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\CmtDbQryWebAPI.c s:riga 128
in CommitCRM.CmtDbQryWebAPI.CmtGetMultiRecordDataByRe cId(String xXMLRequestBuff, Int32 xXMLRequestBuffLen, StringBuilder xXMLResponseDataBuff, Int32 xXMLResponseDataBuffLen, Int32& nStatus) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\CmtDbQryWebAPI.c s:riga 37
in CommitCRM.CmtDbQryProxy.CmtGetMultiRecordDataByRec Id(String xXMLRequestBuff, Int32 xXMLRequestBuffLen, StringBuilder xXMLResponseDataBuff, Int32 xXMLResponseDataBuffLen, Int32& nStatus) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\CmtDbQryProxy.cs :riga 60
in CommitCRM.Object.Load(List`1 lstIDs, String fieldList) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\Object.cs:riga 443
in CommitCRM.Object.LoadMultiple(List`1 lstRecIDs, String fieldList) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\Object.cs:riga 522
in CommitCRM.ObjectQuery`1.FetchObjects(String fieldList) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\QueryCommand.cs: riga 142
in CommitCRM.ObjectQuery`1.FetchObjects() in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\QueryCommand.cs: riga 126
in WebAssist.Services.AccountService.GetByNumber(Stri ng number) in d:\Progetti\WebAssist\WebAssist\Services\AccountSe rvice.cs:riga 85
The same code works without any problem if the results are about 10 or less. Also I managed to query the same data via ODBC without timeout.
Is there anything I am doing wrong with the Web API or the Web API itself has a problem in fetching hundreds of results?
Thanks in advance,
Fabrizio
I'm using the web api and c#. Unfortunately, I get a timeout exception every time that I call FetchObjects() on a result set having hundreds of results.
This is a sample code I'm calling:
CommitCRM.ObjectQuery<CommitCRM.Account> accountSearch = new CommitCRM.ObjectQuery<CommitCRM.Account>();
accountSearch.AddCriteria(CommitCRM.Account.Fields .AccountNumber, CommitCRM.OperatorEnum.opEqual, number);
List<CommitCRM.Account> accounts = accountSearch.FetchObjects();
The last line of the previous code should return about 250 results, but instead it throws this timeout exception:
CommitCRM.Exception: Timeout dell'operazione.
in CommitCRM.CmtDbQryWebAPI.APICall(String sFileName, String sRequest, String& sResponse, Int32& nStatus) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\CmtDbQryWebAPI.c s:riga 128
in CommitCRM.CmtDbQryWebAPI.CmtGetMultiRecordDataByRe cId(String xXMLRequestBuff, Int32 xXMLRequestBuffLen, StringBuilder xXMLResponseDataBuff, Int32 xXMLResponseDataBuffLen, Int32& nStatus) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\CmtDbQryWebAPI.c s:riga 37
in CommitCRM.CmtDbQryProxy.CmtGetMultiRecordDataByRec Id(String xXMLRequestBuff, Int32 xXMLRequestBuffLen, StringBuilder xXMLResponseDataBuff, Int32 xXMLResponseDataBuffLen, Int32& nStatus) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\CmtDbQryProxy.cs :riga 60
in CommitCRM.Object.Load(List`1 lstIDs, String fieldList) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\Object.cs:riga 443
in CommitCRM.Object.LoadMultiple(List`1 lstRecIDs, String fieldList) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\Object.cs:riga 522
in CommitCRM.ObjectQuery`1.FetchObjects(String fieldList) in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\QueryCommand.cs: riga 142
in CommitCRM.ObjectQuery`1.FetchObjects() in d:\Progetti\CommitCRM\CommitCRM-New-API-Libs-V70-Key-dfeQ34ti8\CommitCRM-CSharp\Source\CommitLib\CommitCRM\QueryCommand.cs: riga 126
in WebAssist.Services.AccountService.GetByNumber(Stri ng number) in d:\Progetti\WebAssist\WebAssist\Services\AccountSe rvice.cs:riga 85
The same code works without any problem if the results are about 10 or less. Also I managed to query the same data via ODBC without timeout.
Is there anything I am doing wrong with the Web API or the Web API itself has a problem in fetching hundreds of results?
Thanks in advance,
Fabrizio
Comment