Heads-Up: TomEE 10.1.0 / Tomcat 10.1.42 Multipart Request Issues

Richard Zowalla <[email protected]> Thu, 3 Jul 2025 08:34:35 +0200
Newsgroups gmane.comp.java.openejb.user
Message-ID <D91C11C9-C6DF-41AA-9693-BD596DE1D68C__23753.1565757067$1751524493$gmane$org@apache.org>
--Apple-Mail=_BB5EDEFB-945E-4A8C-938D-51576A66D8DA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

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 =3D 10). When using JSF or PrimeFaces, =
extra request parameters get added=E2=80=94so multipart request limits =
are hit sooner than expected.

The result:

With JSF, the related Tomcat exception isn=E2=80=99t logged.

Using AJAX, you=E2=80=99ll just see a vague 500 error in Chrome =
DevTools.

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

Tomcat 10.1.43 increases the default maxPartCount to 50, which =
helps=E2=80=94but 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=3D"1000" maxPartCount=3D"100" =
maxPartHeaderSize=3D"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=E2=80=99re hitting mysterious =
upload/form issues, this setting might be the culprit.

Hope this saves someone a headache!

Richard=

--Apple-Mail=_BB5EDEFB-945E-4A8C-938D-51576A66D8DA--