Failed to obtain result from server within specified time of 200sec Exception is thrown when the request reached maximum poll limit to get the response from the Salesforce Server within the default 200 seconds limit.
To overcome the issue, pollWaitMillis can be set to “60000”(1 Minute)or increased as per your deployment timing.
pollWaitMillis: pollWaitMillis is the number of milliseconds to wait between polls for retrieve/deploy requests results. The default value for pollWaitMillis is 10000 milliseconds (ten seconds).
maxPoll — maxPoll is the number of polling attempts to be performed before aborting the retrieve/deploy requests results for time out. The default value for maxPoll is 200. When maxPoll default value 10 seconds is combined with the default value of pollWaitMillis (10000), this means that the Ant Migration Tool will give the server process a total of 2,000 seconds (33 minutes) to complete before timing out.
Sample Retrieve Code:
<target name="retrieve">
<sf:retrieve
username="${sf.communityusername}"
password="${sf.communitypassword}"
ServerURL="${sf.ServerURL}"
retrieveTarget="Retrieve"
maxPoll="20"
pollWaitMillis="60000"
unpackaged="package.xml"
/>
</target>