-
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
lease expiration on standalone Eureka server with self-presenvation enabled is broken #4101
Comments
To add on top of that, looks like |
Hello @ViliusS , please provide a minimal, complete, verifiable example that reproduces the issue. |
Here you go Just run this Maven project which should start Eureka server in standalone mode. After that, connect any number of Eureka clients to it. In the logs you will always see: This doesn't allow leases to expire, unless you disable self preservation mode. |
For |
I have changed the value referenced above back to |
However, after I've run a client against the updated sample, when |
So, maybe Btw, I don't understand why |
@ViliusS sorry for not getting back to you on this, however, the only thing we do here is pass the properties provided by the users to Netflix/Eureka's |
@OlgaMaciaszek while waiting for the answer I've already filled an issue at Netflix/eureka#1459 , however I still think It was too long, so I don't remember the exact math, but the reason why setting it to So, in the end both fixes are needed:
|
The |
Is that really true? As far as I see this property is sent to You can also see from here https://github.com/Netflix/eureka/blob/015400c60d3dc730c3fc4871e9b586d3805cce0d/eureka-server-governator/src/main/java/com/netflix/eureka/EurekaContextListener.java#L28 going down to https://github.com/Netflix/eureka/blob/015400c60d3dc730c3fc4871e9b586d3805cce0d/eureka-core/src/main/java/com/netflix/eureka/registry/PeerAwareInstanceRegistryImpl.java#L209-L237 that Eureka itself uses that parameter for sending total client count (even though it is confusedly named |
It looks like lease expiration on standalone Eureka server with self-presenvation enabled is completely broken. I have the following configuration:
If I start completely empty server with this configuration it says:
I tracked it down to
defaultOpenForTrafficCount
which by default is set to 1, changed toeureka.instance.registry.defaultOpenForTrafficCount=0
. Now the server starts with:Issue however not solved because even if I add dozen of eureka clients the threshold never changes even when is actually recalculated. I get
c.n.e.r.PeerAwareInstanceRegistryImpl : Current renewal threshold is : 0
in the logs every minute.Hence, lease expiration never kicks in unless I completely disable self-preservation mode.
The text was updated successfully, but these errors were encountered: