Openstack OverLimit errors during nova boot

I was stung by a provisioning error for a specific user in my openstack environment recently.  The quotas associated with the user's tenant was the obvious area to review, but I couldn't find any quotas which had been exceeded.

nova  boot ... --user-data file.txt newvm 

ERROR (OverLimit): Over limit (HTTP 413) (Request-ID: req-570be40d-6790-487e-8cfd-66a4d963fd68)

After much unfortunate thrashing, we discovered this user had a large user-data file.  It was sufficiently large (98k) that, after being base64 encoded, and together with the rest of the API call, it triggered the nova API max_request_body_size_opt limit (112k based on nova/api/sizelimit.py).  The key to identifying this problem was in enabling debug on the nova boot command:

nova --debug boot ...
...
RESP BODY: 413 Request Entity Too Large

Request is too large.

After thinning down the user-data to a point where your API request makes it through the first limit, we get a new ( but much more helpful! ) error:

ERROR (BadRequest): User data too large. User data must be no larger than 65535 bytes once base64 encoded. Your data is 111572 bytes (HTTP 400) (Request-ID: req-63197123-e6f8-496d-b338-c43b65b15e76)

In conclusion, be advised that the size of the API call, and by extension the size of the user-data, is a part of the limits imposed by the nova api.