- Newest
- Most votes
- Most comments
This is indeed a known issue with AWS Elastic Beanstalk's Tomcat platform when using Java 17 or later. The problem stems from JDK 17 removing support for the -XX:MaxPermSize option, which was previously used to configure the PermGen space in older Java versions.
On July 13, 2023, AWS Elastic Beanstalk released a new Tomcat platform branch based on Amazon Linux 2023 (AL2023) that includes Corretto 17 with Tomcat 10. The documentation explicitly mentions that JDK 17 removed support for the Java -XX:MaxPermSize option, and using this option with this platform branch will result in an error.
Regarding your specific questions:
-
Yes, this is a known limitation documented by AWS. The
-XX:MaxPermSizeoption is incompatible with JDK 17 and later. -
For a supported workaround, you should check the JVM Container options in the Elastic Beanstalk Developer Guide. While the documentation doesn't provide a specific solution for removing these flags, you might need to:
- Configure your environment without using the built-in JVM memory management
- Use custom platform hooks to modify the startup configuration after Elastic Beanstalk has applied its settings
- Consider creating a custom platform version if the above options don't work
- Yes, Tomcat 10 is officially supported on Java 17+ in Elastic Beanstalk. The Corretto 17 with Tomcat 10 AL2023 platform version 5.0.0 was specifically designed for this combination. However, there appear to be configuration issues with the default JVM options that need to be addressed.
The empty -Xmx and -Xms flags you're experiencing might be related to how the platform handles unset or improperly configured memory settings. When you explicitly set these values in the EB Console, they should have proper values, but the -XX:MaxPermSize flag will still cause issues with Java 17+.
I recommend reaching out to AWS Support for a definitive solution to this platform-level issue, as it appears to be a fundamental configuration problem with how the Tomcat platform injects JVM flags for Java 17+ environments.
Sources
Release: Elastic Beanstalk launches Amazon Linux 2023 Tomcat platform on July 13, 2023 - AWS Elastic Beanstalk
Using the Elastic Beanstalk Tomcat platform - AWS Elastic Beanstalk
answered 10 months ago
Relevant content
asked 5 years ago
asked 6 years ago
asked 5 years ago

Thank you for the confirmation.
To clarify: based on your response, it appears that while Tomcat 10 on Java 17+ is officially supported on Elastic Beanstalk, the platform currently injects JVM flags (
-XX:MaxPermSize) that are incompatible with Java 17+, and there is no supported way to disable or override this behavior for WAR-based deployments.Can you please confirm:
This confirmation would help us make an architectural decision.