-
Notifications
You must be signed in to change notification settings - Fork 559
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
Reinitialization of Spring context when using SnapStart #805
Comments
Thanks for raising this. Let me reproduce and get back to you. |
olegz
added a commit
to olegz/aws-serverless-java-container
that referenced
this issue
Mar 26, 2024
Also updated to s-c-function-serverless-webb 4.1.1-SNAPSHOT This commit forces wait for full context initialization if context is created during snapstart creation
2 tasks
deki
added a commit
that referenced
this issue
Apr 4, 2024
deki
added a commit
that referenced
this issue
Apr 4, 2024
@maschnetwork changes have been merged to the main branch in case you want to verify. A release will probably done tomorrow. |
Release 2.0.1 is now available. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To help us debug your issue fill in the basic information below using the options provided
Serverless Java Container version:
2.0.0
Implementations:
Spring Boot 3
Framework version:
SpringBoot 3.1.4
(or higher)Frontend service:
REST API
Deployment method:
CDK
Scenario
During the first call to a SnapStart enabled Lambda function the Spring Context re-initializes which results in a high request duration of around 4-5 seconds for a standard Spring Boot Application (accessing a PostgreSQL DB). In prior versions (tested with 2.0.0-M2) this does not happen and the request duration is much faster (1-2 seconds). There seems to be an issue with the latest version and how the initialization of the context is handled.
Expected behavior
The Spring context should not re-initialize as it should be stored within the SnapShot.
Actual behavior
The spring context re-initializes
Steps to reproduce
Full log output
Paste the full log output from the Lambda function's CloudWatch logs
With 2.0.0 (Issue - Spring context re-initializes):
With 2.0.0-M2 (No Issue ):
The text was updated successfully, but these errors were encountered: