Andrew Robinson created NIFI-11486:
--------------------------------------

             Summary: HandleHTTPRequest maxFormContentSize of 200000 error
                 Key: NIFI-11486
                 URL: https://issues.apache.org/jira/browse/NIFI-11486
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.21.0, 1.20.0
            Reporter: Andrew Robinson
         Attachments: HandleHTTPRequest_1.21.0_Settings.png, 
HandleHTTPRequest_1.21.0_StackTrace.txt

The issue is with the HandleHTTPRequest processor. When upgrading a cluster 
from 1.19.x to 1.21.0 we started seeing inbound multipart form HTTP requests 
erroring with "java.lang.IllegalStateException: Form is larger than max length 
200000". I have attached the stack trace.

The processor allows POST requests, has Multipart Request Max Size set to 130 
MB and Multipart Read Buffer Size set to 2MB (I have attached the 
HandleHTTPRequest properties). It receives a multipart form data request where 
the first part of the form is a large file and the second part is a JSON 
string. The issue only occurs when the JSON string is greater than 200,000 
bytes (~195kb).

This seems related to the Jetty upgrade in ticket NIFI-10995. Searching for 
this error in Jetty and doing a blame shows it could be related to the 
following Jetty change: [https://github.com/eclipse/jetty.project/pull/9287.] 
See 
[https://github.com/eclipse/jetty.project/blame/7a7d69a69f4f51772e20813332291189a24e91b1/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java]
 line 2382.

What is not clear to me is if this is a problem with Jetty or with the manner 
that Nifi passes the Multipart Request Max Size parameter to Jetty.

We did try adding the following property to the JVM 
"org.eclipse.jetty.server.Request.maxFormContentSize" but it seemed to take no 
effect.

We rolled back to our previous 1.19.x version after trying the above and it 
processed records normally again with no issues.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to