Skip to content
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

EOS collector doesn't clear jsonrpclib history #388

Closed
dasturias opened this issue May 16, 2018 · 1 comment
Closed

EOS collector doesn't clear jsonrpclib history #388

dasturias opened this issue May 16, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@dasturias
Copy link

dasturias commented May 16, 2018

Due to this issue in jsonrpclib joshmarshall/jsonrpclib#47 if the jsonrpclib history is not cleared memory will grow unbounded. The fix is to add history.clear() after every call. Sample diff here:

diff --git a/eos/collectors/eos.py b/eos/collectors/eos.py
index 86da378..c3bd436 100755
--- a/eos/collectors/eos.py
+++ b/eos/collectors/eos.py
@@ -33,6 +33,7 @@ class IntfCounterCollector(object):
       result = self.server_.runCmds(1, ["show interfaces counters",
                                         "show interfaces counters errors",
                                         "show interfaces counters bins"])
+      jsonrpclib.history.clear()
       (counters, error_counters, bin_counters) = result

       # Print general interface counters 
@xavierhardy
Copy link

This issue has been fixed and should be closed.

@johann8384 johann8384 added this to the 1.3.3 milestone Dec 5, 2018
@johann8384 johann8384 added the bug label Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants