Server error code 413 - Request entity too large

7,185 views
Skip to first unread message

Aldo Neto

unread,
Jun 7, 2012, 11:13:02 AM6/7/12
to google-web-toolkit
Hi,

I'm getting a very strange error here. When creating a new entry to an entity, I'm getting a "Server error 413". However, the strange part is: I use this same creation in other place and it works just fine. In addition to that, this problem only happens when I'm in development mode. When I deploy the application, the error doesn't happen.

I understand that the description I provided is very vague, but I found nothing on this subject on the web and I have no idea how to debug it. Can anyone help me pointing me the place where I can start to debug and understand what is wrong with my app?

Thanks,
Aldo

Jens

unread,
Jun 7, 2012, 2:23:15 PM6/7/12
to google-we...@googlegroups.com, google-web-toolkit
I'm getting a very strange error here. When creating a new entry to an entity, I'm getting a "Server error 413". 

This basically means that your data you send to the server is too large and hits a limit configured somewhere on your server. So you should check how large your request is that fails and check your server documentation what default values apply for maximum form uploads, header/request/response buffers, etc and increase them as needed.

However, the strange part is: I use this same creation in other place and it works just fine. 

The data you send to the server is probably just a tiny bit smaller and thus it works because you don't hit a server limit anymore.
 
In addition to that, this problem only happens when I'm in development mode. When I deploy the application, the error doesn't happen.

That would mean that your development mode server (GWT's embedded Jetty or anything else if you use -noserver) is configured differently (has different default values) than your server you deploy to. Or you possibly have load balancers in front of your deployment servers so that the whole situation is a bit different.

In general its not bad seeing this error because it protects your server from being knocked down with very large (denial of service) requests. So don't go crazy and configure your server to accept 1GB of POST data or something. Configure it to a value that suites your needs.

-- J.

Aldo Neto

unread,
Jun 8, 2012, 8:48:14 AM6/8/12
to google-we...@googlegroups.com
Thank you Jens for you quick reply.

I understand now what is going on. However, I still don't understand why that part of the code is sending such huge amount of data to the server, so do you know a way I can debug that? I tried enabling the gwt.rpc.dumpPayload flag but that part is not even reached. I tried to search where that error is raised but I didn't find it either.

I'm asking that because perhaps I'm doing something wrong by sending so much data to the server, so I'd like to make sure before increasing the server acceptance configuration.

Do you have any idea how to check that?

Thanks,
Aldo


-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/euXk7NKJR2sJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Thomas Broyer

unread,
Jun 8, 2012, 9:32:03 AM6/8/12
to google-we...@googlegroups.com


On Friday, June 8, 2012 2:48:14 PM UTC+2, Aldo wrote:
Thank you Jens for you quick reply.

I understand now what is going on. However, I still don't understand why that part of the code is sending such huge amount of data to the server, so do you know a way I can debug that? I tried enabling the gwt.rpc.dumpPayload flag but that part is not even reached. I tried to search where that error is raised but I didn't find it either.

Have you checked in your browser's developer tools (Firebug, Chrome Web Inspector, etc.) what goes on the wire?
Reply all
Reply to author
Forward
0 new messages