From tincho at debian.org Mon Feb 29 17:41:12 2016 From: tincho at debian.org (=?UTF-8?Q?Mart=c3=adn_Ferrari?=) Date: Mon, 29 Feb 2016 17:41:12 +0000 Subject: [newmaint-site] Problems with DC submission In-Reply-To: References: Message-ID: <56D482B8.8090001@debian.org> Hey, Since a few days ago I noticed my (fairly large) cron job that submits data on git.d.o started to fail with a cryptic message (simplejson.decoder.JSONDecodeError: No JSON object could be decoded). Finally, I changed the code to output the JSON that was getting returned from the application, and it became clear that I hit two different bugs. One is that it seems the submission is too big for some django limit on the size of the POST data. I checked and the JSON being posted is about 1.5 MiB in size. No thing way too crazy... Can we increase this limit? The other is that this error for some reason did not follow the usual route, and instead of getting properly wrapped error, I got a 500 response with an HTML content. So, either the server application is failing to be consistent, or the client is not being able to handle this kind of problem. The response that the client tries to interpret as JSON: 413 Request Entity Too Large

Request Entity Too Large

The requested resource
/contributors/post
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
Apache Server at contributors.debian.org Port 443
From enrico at enricozini.org Mon Feb 29 17:57:37 2016 From: enrico at enricozini.org (Enrico Zini) Date: Mon, 29 Feb 2016 18:57:37 +0100 Subject: [newmaint-site] Problems with DC submission In-Reply-To: <56D482B8.8090001@debian.org> References: <56D482B8.8090001@debian.org> Message-ID: <20160229175737.GA14261@enricozini.org> On Mon, Feb 29, 2016 at 05:41:12PM +0000, Mart?n Ferrari wrote: > Since a few days ago I noticed my (fairly large) cron job that submits > data on git.d.o started to fail with a cryptic message > (simplejson.decoder.JSONDecodeError: No JSON object could be decoded). > > Finally, I changed the code to output the JSON that was getting returned > from the application, and it became clear that I hit two different bugs. > > One is that it seems the submission is too big for some django limit on > the size of the POST data. I checked and the JSON being posted is about > 1.5 MiB in size. No thing way too crazy... Can we increase this limit? > > The other is that this error for some reason did not follow the usual > route, and instead of getting properly wrapped error, I got a 500 > response with an HTML content. So, either the server application is > failing to be consistent, or the client is not being able to handle this > kind of problem. In my experience, when this happens it is a problem in python-requests: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801506 and submitting with curl actually works. The bug has an example curl line to redo the same that dc-tool is doing. If you hit some django limit with curl we can indeed look into relaxing it, and I would expect the limit to be related to form post data, and not to file uploads. Enrico -- GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: