nautobot/nautobot-app-golden-config

Database connections staying open during config deployment

alhogan opened this issue · 1 comments

Environment

  • Python version: 3.9
  • Nautobot version: 1.6.2
  • nautobot-golden-config version: 1.6.4 (believe 2.x as well)

Expected Behavior

As Nornir tasks are completed, DB connections are closed.

Observed Behavior

Max number of DB connections are hit and a psycopg2.OperationalError is thrown.

Steps to Reproduce

  1. Setup dev environment using Postgres
  2. Run config deployment on N devices, where N is > MAX_CONNECTIONS in the DB settings

Submitting a PR to fix this shortly