AGSFindParameters delegates call Failure(didFailWithError) with "The request timed out."

2029
1
Jump to solution
01-20-2016 11:09 AM
GajaNaik
New Contributor III

Hello,

i am using AGSFindParameters, service to search Asset on MAP as below:

                    for (NSArray *arrCurrentAsset in m_arrAssetDetails)

                    {

                        self.m_findParams = [[[AGSFindParameters alloc]init] autorelease];

                        self.m_findParams.contains = NO;

                        self.m_findParams.layerIds = arrLayerIDs;

                        self.m_findParams.outSpatialReference = self.m_mapView.spatialReference;

                        self.m_findParams.returnGeometry = TRUE;

                        self.m_findParams.searchFields =  arrUniqueNames;

                        self.m_findParams.searchText = [arrCurrentAsset objectAtIndex:2];

                        //execute find task

                        [self.m_findTask executeWithParameters:self.m_findParams];

                    }

there are around 350 elements in m_arrAssetDetails, so above query executes with individual search parameter those many times....

Q. 1) is there any better way which i can find all asset with one query?

-(void)findTask:(AGSFindTask *)findTask operation:(NSOperation *)op didExecuteWithFindResults:(NSArray *)results {

}

delegates get called for around 50 Assets then

-(void)findTask:(AGSFindTask *)findTask operation:(NSOperation *)op didFailWithError:(NSError *)error {

}

get called till 350 calls.... error i get is:

NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4, NSUnderlyingError=0x7d45a0e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102}

this happens for only one client, rest client's with different server works fine.

Q. 2) what is the possible reason i am getting error , is from server side....how to fix it from server side or app side..?

Plz answer its urgent....

0 Kudos
1 Solution

Accepted Solutions
GajaNaik
New Contributor III

Hello,

Answering my own question..... after digging out further i change slightly parameter's and added timeout with higher value.by default is 60.

parameter name is timeoutInterval, max. time server should response delegates with result.

will be helpful if any one facing the same issue.

Thanks,

View solution in original post

1 Reply
GajaNaik
New Contributor III

Hello,

Answering my own question..... after digging out further i change slightly parameter's and added timeout with higher value.by default is 60.

parameter name is timeoutInterval, max. time server should response delegates with result.

will be helpful if any one facing the same issue.

Thanks,

View solution in original post