nautobot / nautobot-app-golden-config

Golden Configuration App for Nautobot.
https://docs.nautobot.com/projects/golden-config/en/latest/
Other
101 stars 57 forks source link

E1014: Unknown error - weak object has gone away #817

Open mattmiller87 opened 1 month ago

mattmiller87 commented 1 month ago

Environment

Expected Behavior

Observed Behavior

E1014: Unknown error - weak object has gone away

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/nornir/core/task.py", line 99, in start
    r = self.task(self, **self.params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nornir_jinja2/plugins/tasks/template_file.py", line 42, in template_file
    t = env.get_template(template)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1013, in get_template
    return self._load_template(name, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 961, in _load_template
    template = self.cache.get(cache_key)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/utils.py", line 466, in get
    return self[key]
           ~~~~^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/utils.py", line 504, in __getitem__
    rv = self._mapping[key]
         ~~~~~~~~~~~~~^^^^^
TypeError: weak object has gone away

Steps to Reproduce

1. 2. 3.

Apologies for the lack of detail, I will attempt to update once I have more. I wanted to at least capture the error and get the issue submitted.

jdrew82 commented 1 week ago

We've determined this to be caused by an object being garbage collected before it's use. It's resolved by increasing resources on the worker or reducing the number of devices being processed.

itdependsnetworks commented 1 week ago

@lampwins @glennmatthews any thoughts on this?