-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ServerInitializer blocks Tomcat startup for two minutes #4152
Comments
Do you mean this line? Line 202 in fa07416
Maybe there could be a property that you could set when deploying to a WAR? We don't test WAR deployment of eureka server. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Yes, exactly.
A property for Eureka would be great, since there does not seem a way to configure this behavior in Tomcat. |
Thanks for the clarification, PRs welcome. |
PR is open now. |
Further investigation showed that the initial idea does not fix the issue, therefore I closed the PR again. We will continue our investigation. |
A new PR is open now which fixes the issue we are having. The "getApplications()" needs to be skipped both for the server and the client in our case. |
It does not seem that the PR has been reviewed yet. Can you tell if this could happen soon? This is important for our Jakarta migration. |
I created a new PR that is based on the current main branch (after the 4.1.0 release). |
When Tomcat starts up and finds an already deployed WAR file containing the Eureka server, the startup of this web application hangs for about two minutes after this log:
After some debugging I found that starting the Eureka server also initializes the client in
EurekaServerAutoConfiguration#peerAwareInstanceRegistry
. Upon client initialization, a request is performed against the currently starting Eureka server. Tomcat seems to block such a request during its own startup, causing the application to pause for about two minutes. This does not happen when starting my application with "bootRun" or redeploying the WAR in Tomcat once it has been started.I am using Tomcat 10.1.4, Spring Boot 3.0.0 and Spring Cloud Netflix 4.0.0.
The text was updated successfully, but these errors were encountered: