Using Django ORM in threads and avoiding "too many clients" exception by using BoundedSemaphore Using Django ORM in threads and avoiding "too many clients" exception by using BoundedSemaphore multithreading multithreading