[SalesForce] ant deploy error – Maximum size of request reached

I used to deploy metadata using ant migration tool successfully but from last night I am getting the below error:

John@John:~/mm_workspace/TEST_Project/deploy$ ant deployUnpackaged 
Buildfile: /home/john/mm_workspace/TEST_Project/deploy/build.xml

deployUnpackaged:

BUILD FAILED
/home/john/mm_workspace/TEST_Project/deploy/build.xml:72: Failed to submit request to https://cs19.salesforce.com/services/Soap/m/35.0/00D293456000Qaf for user john@test.com.dev.
Error: {http://schemas.xmlsoap.org/soap/envelope/}Client - Maximum size of request reached. Maximum size of request is 52428800 bytes.

Total time: 2 minutes 10 seconds

I think this is because of too much metadata that I am trying to deploy. For now, I am deploying classes and then VF pages and so on but I am looking for an option to deploy everything in one go without running into the above error.

I am sure that people are working on more complex projects than mine with lots of metadata and I am wondering how are they deploying with out hitting this error?

Thanks

Best Answer

There are lots of limits around the Salesforce Metadata API, as we have found working on Gearset which allows you to manage your releases, and is built on top of the Metadata API.

Is your package.xml specifying everything individually, or are you wilcarding some things?