-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Startup of Eureka in local environment takes 3-5 minutes #42
Comments
When eureka first starts up without peers it takes about 5 mins for it to start serving requests because it waits for all clients to register completely before it can give out the list. You can disable this by setting this #Set this only for this sample service without which starting the instance will by default wait for the default of 5 mins In a production environment, it is recommended that you don't set this property. You might want to revert the other property changes above as they are unrelated. |
Hi Karthik-vn, Thanks for the reply. I'm actually already setting that parameter, but it doesn't seem to make a difference. Here's what I have for a config: Tomcat setenv.sh:
And my eureka-server.properties (masked):
And finally eureka-server-dev.properties (masked):
|
@jfenner - this might sound silly, but are you rebuilding the eureka-server webapp with the new properties being set? also, you might want to try setting those -D's in the actually eureka-server.properties file itself. here's a link to my FluxCapacitor Netflix OSS FAQ that describes this issue: https://github.com/cfregly/fluxcapacitor/wiki/NetflixOSS-FAQ#eureka-service-discovery-load-balancer The eureka.registration.enabled=false should have taken care of the problem (it has for others), so i wonder if those -D's aren't being picked up for some reason. i just added karthik's recent suggestion of setting eureka.waitTimeInMsWhenSyncEmpty=0 to the FAQ as i hadn't heard of that before. lemme know if that helps. -chris |
I'm also seeing this, even with |
@NiteshKant @cfregly @karthik-vn This is actually happening in There are two possible fixes to this:
The first is obviously less work, but second's also pretty simple. Thoughts? |
@bpollack I personally like the option 2. so that there is less configuration to set. |
@NiteshKant Hmm, I like your idea. Will quickly whip up a PR in that style for feedback. |
syncUp delays up to five times for 30 seconds (by default) if it fails to sync with its peers. That's great *if there are peers*, but if there aren't any (say, you're a developer running a local Eureka), it's simply silly. Instead of delaying in that situation, simply immediately return to continue the startup sequence. Fixes Netflix#42
To eliminate syncUp just set |
When starting Eureka in a dev environment with no other Eureka servers available, the startup times takes between 3 and 5 minutes. I was that setting the following parameters would bypass this:
eureka.enableSelfPreservation=false
eureka.registration.enabled=false
However, it still is taking 3-5 minutes. Is there something else that needs to be set for this to work?
The text was updated successfully, but these errors were encountered: