pycharm社区版中使用sqlite3中出现django.db.utils.OperationalError: database is locked解决办法
1、设置disconnect pool:database->settings->details,将disconnect pool设置为1min
2、在settings文件中增加timeout
选项
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'OPTIONS':
{
'timeout':20
},
}
}