BFar
BFar

Reputation: 2497

Cloud Foundry: Error 402: App packaging failed: 'Application exceeds maximum allowed size (536.87MB)'

My app is certainly large, but the 536MB limit seems strange given that my $ vmc stats is setup like this:

+----------+-------------+----------------+--------------+---------------+
| Instance | CPU (Cores) | Memory (limit) | Disk (limit) | Uptime        |
+----------+-------------+----------------+--------------+---------------+
| 0        | 1.3% (4)    | 976.5M (2G)    | 263.0M (2G)  | 0d:0h:32m:56s |
+----------+-------------+----------------+--------------+---------------+

Does anyone know how to avoid the 402 Error?

Cheers, Bryan

Upvotes: 1

Views: 350

Answers (2)

Minh Hoang
Minh Hoang

Reputation: 31

max_droplet_size has been changed to max_package_size. However, you may also have to change nginx's client_max_body_size.

Upvotes: 0

Andrea Campi
Andrea Campi

Reputation: 456

The actual (default) limit for the "droplet size" (the total size of your app's source and resources) is 512MB; that turns out to be 536 * 10^6 bytes.

If you are running on cloudfoundry.com then that's it, you can't control that parameter, all you can do is reduce the size of your code. However, I think this limit applies to the size before staging. This means that you can probably split some of the code out into Maven dependencies. Worth a try.

If you have your own installation however, you can fix this by editing cloud_controller.yml and changing the max_droplet_size parameter. Note that the value is interpreted as bytes, do your math :)

Upvotes: 2

Related Questions