Saturday, December 18, 2010

Request Entity Too Large While deploying a Process from BPEL Console

While trying to deploy a BPEL process from BPEL Console you are getting Following error message

Request Entity Too Large
The requested resource /BPELConsole/SupplyOrder/OrderToDisplay.jsp
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

The reason is that the request entity size is much higher than the limit set in LImitRequestBody in apache server.

As per Apache document


LimitRequestBody directive

This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.

The LimitRequestBody directive allows the user to set a limit on the allowed size of an HTTP request message body within the context in which the directive is given (server, per-directory, per-file or per-location). If the client request exceeds that limit, the server will return an error response instead of servicing the request. The size of a normal request message body will vary greatly depending on the nature of the resource and the methods allowed on that resource. CGI scripts typically use the message body for passing form information to the server. Implementations of the PUT method will require a value at least as large as any representation that the server wishes to accept for that resource.

This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks.

If, for example, you are permitting file upload to a particular location, and wich to limit the size of the uploaded file to 100K, you might use the following directive:

LimitRequestBody 102400

The Oracle application server internally use Apache server.

We need to configure this to a higher value than the requested entity.

It can be set in following file

SOA_HOME\APache\APache\conf\httpd.conf

There you can set the limit request body to a value as per your requirement.

One thing you have to keep in mind is the value mentioned over there is in byte

We have

1 MB = 1024 KB

1 KB = 1024 Bytes

Therefor 1 MB = 1048576 Bytes.

So if you have a maximum of 1 MB of entity you need to set it to 1048576

No comments: