+ Start a Discussion
mikefmikef 

ant tool kit request time out error

Hi:

I am getting this error, build.xml:20: Request timed out, check max poll and poll wait millis attributes

I looked through the ant-salesforce.jar file and never found an xml file with these attributes.

Where can I set these?

Thank you.
Best Answer chosen by Admin (Salesforce Developers) 
SaaspertSaaspert

http://www.salesforce.com/us/developer/docs/daas/Content/commondeploymentissues.htm#meta_issues

 

 

The most common connection problems are detailed below:

 

    * Request timed out — When you retrieve or deploy metadata, the request is sent asynchronously, meaning that the response is not returned immediately. Because these calls are asynchronous, the server will process a deploy() to completion even if the Force.com Migration Tool times out. If the deploy succeeds, the changes will be committed to the server. If the deploy fails after timing out, there is no way to retrieve the error message from the server. For this reason, it is important to tune your pollWaitMillis and maxPoll parameters if you receive time-out errors:

          o pollWaitMillis — The number of milliseconds to wait between polls for retrieve/deploy results. The default value is 10000 milliseconds (ten seconds). For long-running processes, increase this number to reduce the total number of polling requests, which count against your daily API limits.

          o maxPoll — The number of polling attempts to be performed before aborting. The default value is 20. When combined with the default value of pollWaitMillis (10000), this means the Force.com Migration Tool will give the server process a total of 200 seconds (20 poll attempts, waiting 10 seconds between them) to complete before timing out.

      Note

      Since these parameters have default values, they do not have to be specified, and may not exist on your named targets. To add these parameters, include them in the target definition. For example:

 

      <sf:retrieve 

        username="${sf.username}"

        password="${sf.password}"

        serverurl="${sf.serverurl}"

        retrieveTarget="retrieveUnpackaged"

      . unpackaged="unpackaged/package.xml"

        pollWaitMillis="10000"

        maxPoll="100"/>

 

 

It is recommended to add these parameters to sf:deploy as well. 

All Answers

JonPJonP
These are parameters to the <sf:deploy> Ant task.  The actual parameter names are "maxPoll" and "pollWaitMillis", as documented in the help file in the zip file that contains ant-salesforce.jar and the example files.  If you don't see this in the help, you should download a new copy of this tool.
SaaspertSaaspert

http://www.salesforce.com/us/developer/docs/daas/Content/commondeploymentissues.htm#meta_issues

 

 

The most common connection problems are detailed below:

 

    * Request timed out — When you retrieve or deploy metadata, the request is sent asynchronously, meaning that the response is not returned immediately. Because these calls are asynchronous, the server will process a deploy() to completion even if the Force.com Migration Tool times out. If the deploy succeeds, the changes will be committed to the server. If the deploy fails after timing out, there is no way to retrieve the error message from the server. For this reason, it is important to tune your pollWaitMillis and maxPoll parameters if you receive time-out errors:

          o pollWaitMillis — The number of milliseconds to wait between polls for retrieve/deploy results. The default value is 10000 milliseconds (ten seconds). For long-running processes, increase this number to reduce the total number of polling requests, which count against your daily API limits.

          o maxPoll — The number of polling attempts to be performed before aborting. The default value is 20. When combined with the default value of pollWaitMillis (10000), this means the Force.com Migration Tool will give the server process a total of 200 seconds (20 poll attempts, waiting 10 seconds between them) to complete before timing out.

      Note

      Since these parameters have default values, they do not have to be specified, and may not exist on your named targets. To add these parameters, include them in the target definition. For example:

 

      <sf:retrieve 

        username="${sf.username}"

        password="${sf.password}"

        serverurl="${sf.serverurl}"

        retrieveTarget="retrieveUnpackaged"

      . unpackaged="unpackaged/package.xml"

        pollWaitMillis="10000"

        maxPoll="100"/>

 

 

It is recommended to add these parameters to sf:deploy as well. 

This was selected as the best answer
Rocky.4QRocky.4Q

Thank You!