1👍
✅
Common way to resolve issues with databases in django threads worked for me – i’ve just added:
django.db.connection.close()
before starting my thread
Short explanation:
Then django forks new thread, the child uses the same connection to DB, as a parent.
If we close the connection, a child will create a new one.
Source:stackexchange.com