[SalesForce] LIMIT EXCEEDED during ANT retrieve call

I am trying to retrieve metadata from Salesforce using ANT retrieve but it goes in timeout and I get the following error message when I restart it:

(Error: Retrieve failed: {"done":"true","errorMessage":"LIMIT_EXCEEDED: Too many files in retrieve call, limit is: 10000","errorStatusCode":"LIMIT_EXCEEDED","id":"***********","status":"Failed","success":"false","zipFile":null})

Looking online it seems to be that there is a retrieve call limit on objects in the environment.
Looking at the ID its an AsyncRequestStatus

My question is:
How can I find out which object(metadata component) has all this data which doesnt make it run?

Is there a work around to this? Do I need to split the items I wish to retrieve?

Best Answer

Your package.xml file probably includes a large number of wildcard entries and is executing against a large, heavily customized environment. The Id of the specific metadata entry that precipitated the failure is more or less irrelevant - it's just the proverbial straw that breaks the camel's back.

The cure for the issue is simply to break up your metadata operation. You'll need to perform your retrieve in smaller chunks by splitting up your package.xml into smaller units, each of which extracts fewer than 10,000 total files.

Without seeing what you're pulling, we cannot make any specific recommendations. One possible culprit could certainly be if you're pulling a very large number of reports and dashboards. That would be an easy element to pull out into a separate retrieve.

Related Topic