mardi 13 octobre 2015

server error with gunicorn and nginx and sqlite

I run gunicorn together with nginx for my site and I used the following command

gunicorn run:app -w 4 -b 0.0.0.0:8080 --workers=3

which makes use of three workers. My website is connected to an sqlite database. Looking at my log file I sometimes find the following error

raise LockError
LockError

My suspicion is that sqlite cannot be written to in parallel and I should not use three workers in gunicorn. Can anybody confirm that this could explain the problem? thanks cark p.s. my site uses sql-alchemy to manage the sqlite database, just in case that plays a role here

Aucun commentaire:

Enregistrer un commentaire