django database access, loss of connection problems

Because access to the database repeatedly, leading to the old connection did not disappear, the number of connections less than full method to access the database, to solve the problem:
from django.db Import close_old_connections
After each visit, you can add this sentence.

Published 55 original articles · won praise 10 · views 5656

Guess you like

Origin blog.csdn.net/weixin_43890188/article/details/103993667