Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
438 views
in Technique[技术] by (71.8m points)

Django Gunicorn Failed About SQLite Version

I deployed django app to CentOS 7 Server. I want to use Nginx and Gunicorn. By the way i tried to make steps,

gunicorn best.wsgi:application --preload -b 0.0.0.0:8000

when i run this code whit virtual environment gunicorn outputs like;

[2021-01-11 14:56:16 +0000] [93067] [INFO] Starting gunicorn 20.0.4 [2021-01-11 14:56:16 +0000] [93067] [INFO] Listening at: http://0.0.0.0:8000 (93067) [2021-01-11 14:56:16 +0000] [93067] [INFO] Using worker: sync [2021-01-11 14:56:16 +0000] [93070] [INFO] Booting worker with pid: 93070

and working...

But when i try to write gunicorn.service like :

[Unit] Description=gunicorn daemon After=network.target

[Service] User=root Group=root WorkingDirectory=/root/best/best ExecStart=/root/best/virtenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/root/best/best

[Install] WantedBy=multi-user.target

I am getting error like :

django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).

I get this error before and i solved it but its about my virtual environment, i downloaded sqlite version and it worked ('import sqlite3; sqlite3.sqlite_version' output is 3.30.0).

But i dont know how i fix it in Gunicorn side. (Maybe its about gunicorn doesn't see my virtual environment but i can't found how i change this)

Any suggestion to solve it?

Thx to all.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...