Skip to content

lease expiration on standalone Eureka server with self-presenvation enabled is broken #4101

@ViliusS

Description

@ViliusS

It looks like lease expiration on standalone Eureka server with self-presenvation enabled is completely broken. I have the following configuration:

eureka.instance.hostname=localhost
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.server.renewalThresholdUpdateIntervalMs=60000
# this should be the same as eureka.instance.lease-renewal-interval-in-seconds on the clients
eureka.server.expected-client-renewal-interval-seconds=10

If I start completely empty server with this configuration it says:

c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 5

I tracked it down to defaultOpenForTrafficCount which by default is set to 1, changed to
eureka.instance.registry.defaultOpenForTrafficCount=0 . Now the server starts with:

c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 0 instances from neighboring DS node
c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 0

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions