Disallow uploading diffs larger than 1 megabyte.
Review Request #2984 — Created March 19, 2012 and submitted
Disallow uploading diffs larger than 1 megabyte. When diffs are particularly large, they can cause the server to spin at 100% CPU for a very long time. This is normally not a problem (who changes that much code at a time?), but parent diffs make it easier to hit. This change fixes it pretty well for the upload forms on the web site. post-review will also fail to upload, although the error message it prints out is especially bad (it says that the diff file is empty).
Tested with a local instance. Posted a review with a parent branch of release-1.0.x and saw post-review error out.
Description | From | Last Updated |
---|---|---|
I'd say we can just nuke this now. We're changing the error code so no reason to preserve this compatibility. |
chipx86 | |
Hmm, maybe it'd be nice to specify the max size as a field too? |
chipx86 | |
Other errors use "reason", so maybe we should go with that. Kinda wish we could just stick it in err.msg … |
chipx86 |