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?

  • ant uses the metadata api, so you are boud to those limits. Metadata Limits
    – glls
    Jul 24, 2018 at 19:14
  • ok, how do I find out which objects are taking up all this space? also is there a workaround?
    – TheAdmin
    Jul 24, 2018 at 19:20
  • Possible duplicate of Metadata API exception: IO Exception: Exceeded max size limit of 3000000
    – glls
    Jul 25, 2018 at 1:30
  • 2
    While the solution in the proposed duplicate likely applies to this question as well (based on David Reed's answer), I do not agree that this question is a duplicate.
    – Derek F
    Jul 25, 2018 at 12:44
  • Disclaimer: I work for Gearset. If you're looking to grab a copy of your metadata, Gearset automatically batches large retrieve requests for you behind the scenes, so you can run comparisons and migrations between orgs, or just run a back-up job and grab the whole package.zip for your org. There's a free 30-day trial you can try in just a couple of clicks - might help you out this time? (gearset.com)
    – mpd106
    Jul 25, 2018 at 13:44

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.