Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

After a while, etcd consumes most memory and CPU due to constant re-elections #99

Closed
TJC opened this issue Aug 4, 2014 · 8 comments
Closed

Comments

@TJC
Copy link

TJC commented Aug 4, 2014

Seen on "CoreOS 367.1.0", running inside KVM-based virtual machines under Linux.

After running for "some time", etcd appears to get into some kind of tight loop, consuming 100% of a CPU all the time, and gradually increasing in memory usage. Eventually it will consume enough to start breaking other services on the machine.

Looking at the logs for etcd, it seems to be constantly electing new leaders due to heartbeat timeouts -- but I suspect this is a symptom of the memory exhaustion rather than the original cause.

@jonboulle
Copy link

Seems like this is probably etcd-io/etcd#868 and/or etcd-io/etcd#915

@yichengq
Copy link

yichengq commented Aug 4, 2014

This seems to be etcd-io/etcd#868, and it has fixed in 0.4.6

@TJC
Copy link
Author

TJC commented Aug 5, 2014

Ah, cool. Sorry, I tried searching for similar issues first, but missed that ticket.
I'll look forward to the 0.4.6 etcd hitting beta streams.

@TJC
Copy link
Author

TJC commented Aug 5, 2014

I hope that fixes the memory leak issue as well? etcd was using a couple of gigabytes of memory after a couple of weeks of runtime.

@yichengq
Copy link

yichengq commented Aug 6, 2014

@TJC Yes, it fixes the memory leak and the memory usage should be reasonable now.

@TJC
Copy link
Author

TJC commented Aug 7, 2014

OK, cool, I guess I should close this ticket now then.

@TJC TJC closed this as completed Aug 7, 2014
@pmatety
Copy link

pmatety commented Aug 18, 2017

I still see the issue in latest kubernetes

@euank
Copy link
Contributor

euank commented Aug 19, 2017

@Rev1408 Please file a new issue with the details of the issue you're encountering (etcd version, memory usage, preferably heap snapshot after turning on --enable-pprof and dumping it).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants