Hi lal,

Just a quick heads-up to save some debugging time if you're using TomEE 10.1.0.

We ran into a tricky issue caused by the Tomcat 10.1.42 default maxPartCount 
setting (default = 10). When using JSF or PrimeFaces, extra request parameters 
get added—so multipart request limits are hit sooner than expected.

The result:

With JSF, the related Tomcat exception isn’t logged.

Using AJAX, you’ll just see a vague 500 error in Chrome DevTools.

Relevant Tomcat ticket:
https://bz.apache.org/bugzilla/show_bug.cgi?id=69710

Tomcat 10.1.43 increases the default maxPartCount to 50, which helps—but some 
apps (e.g. with p:fileUpload or big forms) may still need a higher value.

You can tweak the parameters in the server.xml for your connector, e.g. setting 
maxPartCount explicitly to a higher value.

Example config for server.xml:

xml
KopierenBearbeiten
<Connector ... maxConnections="1000" maxPartCount="100" 
maxPartHeaderSize="1024" />
This results in a ~200MB allocation for multipart requests.

We burned time on debugging and rebuilding with various Tomcat versions before 
discovering this. If you’re hitting mysterious upload/form issues, this setting 
might be the culprit.

Hope this saves someone a headache!

Richard

Reply via email to