-
Notifications
You must be signed in to change notification settings - Fork 51
Unexpected Runtime Selection in GAE Standard – Instances Randomly Using EE8 (Jetty 12 + Java 21) Instead of Java 17 (Jetty 9) #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is due to an experiment on rolling out the Java21 runtime with Jetty EE8 which will eventually replace the runtimes using Jetty 9.4. @maigovannon will have more info on this, and how to get excluded from this experiment. But there should be no changes in behavior while migrating to the Jetty 12 with EE8, so this is likely a bug. Can you please detail how you are configuring multipart for your Servlet, I cannot seem to reproduce this change in behavior. |
Hi thanks for reaching out to us. We are indeed conducting an internal migration from Jetty 9 (EE7) to Jetty 12 (EE8). However, I would like to point out that this experiment is only scoped to Java17 apps and not for Java21 or Java 11, etc. We are not upgrading the Java versions so I would be surprised to see such behaviour. @vivekbhatnagar could you please clarify where exactly you are seeing Java21 in your logs? The lgos show only Jetty12 being used. Having said that the above is a bug and we will look into it. In order to mitigate it, please revert to using the following flag (ref: https://cloud.google.com/appengine/docs/standard/java-gen2/upgrade-java-runtime#ee8):
This would explicitly force the runtime to use EE7. |
Hi @maigovannon , Thank you for looking into this issue. I appreciate the clarification regarding the migration from Jetty 9 (EE7) to Jetty 12 (EE8) and that this experiment is scoped only to Java 17 applications. To clarify, I do not explicitly see "Java 21" in the startup logs, but I do observe that when an instance starts with the EE8 profile, it exhibits different logging behavior. Specifically: Instances running with EE8 (Jetty 12) show:
Whereas instances running with Jetty 9 (EE7), where everything works as expected, show:
When an instance is assigned the EE8 profile, our servlets using
This does not happen when running on Jetty 9. Mind you, our application is on Java 17. Observations & Speculations:
Servlet Example: For reference, our servlet is structured as follows:
We are aware that a migration to Jakarta EE (from If you need additional details to reproduce the issue, please let me know. Looking forward to your insights. Thanks again for your help! |
Not at all. We use servlets too 😊. I would request you to file a Google support bug on this, share the bugId link and we will fast-track the mitigation. I request this process since you will ahve to share your customer project details and we don't do that in Github. We will root-cause and fix it but we will mitigate it in our backend so that your apps are pinned to Jetty9. Though by doing the same from #358 (comment) will mitigate it fully directly through your end. |
This happens because of an issue in the See jetty/jetty.project#12981 and jetty/jetty.project#12984 for more details. The fix will be included in Jetty |
#368 is the fix |
Signed-off-by: Lachlan Roberts <[email protected]>
One of our application, deployed on Google App Engine (GAE) Standard Environment, is explicitly designed to run on Java 17 with Jetty 9. However, we have observed inconsistent behavior where some instances are randomly being assigned to an EE8 runtime profile (Jetty 12 + Java 21) instead of Java 17 with Jetty 9.
This unexpected transition to Jetty 12 causes multipart request handling failures, leading to the following error:
Observed Behavior in Logs:
When instances use the EE8 profile (Jetty 12 + Java 21), multipart requests fail. The log messages for such instances include:
On the other hand, when instances run on Java 17 (Jetty 9), multipart handling works correctly. The working instances log the following:
Key Issues:
Questions
(appengine-web.xml)
The text was updated successfully, but these errors were encountered: