title: python3.10 RuntimeError populate() isn't reentrant
body: <p>While upgrading it from python 3.6 (working file) to 3.10.4, I encounter the following error.</p>
  <pre><code>File &quot;/usr/local/lib/python3.10/threading.py&quot;, line 1009, in _bootstrap_inner
      self.run()
    File &quot;/usr/local/lib/python3.10/threading.py&quot;, line 946, in run
      self._target(*self._args, **self._kwargs)
    File &quot;/usr/local/lib/python3.10/site-packages/django/utils/autoreload.py&quot;, line 64, in wrapper
      fn(*args, **kwargs)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/commands/runserver.py&quot;, line 110, in inner_run
      autoreload.raise_last_exception()
    File &quot;/usr/local/lib/python3.10/site-packages/django/utils/autoreload.py&quot;, line 87, in raise_last_exception
      raise _exception[1]
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py&quot;, line 375, in execute
      autoreload.check_errors(django.setup)()
    File &quot;/usr/local/lib/python3.10/site-packages/django/utils/autoreload.py&quot;, line 64, in wrapper
      fn(*args, **kwargs)
    File &quot;/usr/local/lib/python3.10/site-packages/django/__init__.py&quot;, line 24, in setup
      apps.populate(settings.INSTALLED_APPS)
    File &quot;/usr/local/lib/python3.10/site-packages/django/apps/registry.py&quot;, line 83, in populate
      raise RuntimeError(&quot;populate() isn't reentrant&quot;)
  RuntimeError: populate() isn't reentrant
  </code></pre>
  <p>Observations:
  The code works file outside the docker and throws the error only in the container.</p>