본문 바로가기

WebDev/Backend

django deploy with sqlite3

django deploy with sqlite3


if you deploy django with sqlite3, don't forget to add a permission to sqlite3 database file parent directory.


for example, if database file path is /a/b/c/db.sqlite3, call chmod o+w /a/b/c



from stackoverflow:


  • Is the program running on the same machine as you're testing it?
  • Is it running as you (or at least the same user as you're testing it as)?
  • Is the disk containing /tmp full? (You're on Unix, so use df /tmp to find out.)
  • Does the /tmp/cer directory have “odd” permissions? (SQLite needs to be able to create additional files in it in order to handle things like the commit log.)
  • Is the unit test code still using that database? (Concurrent opens are possible with a modern-enough SQLite and when in the right filesystem — though /tmp is virtually always on the right sort of FS so it's probably not that — but it's still not recommended.)
  • Is the development code really trying to write to that database, or is something “clever” catching you out and causing it to try to open something else? (I've been caught out by this in my code in the past; don't think it can't happen to you…)
  • Are you using the same version of the SQLite library in the unit tests and the production code?



'WebDev > Backend' 카테고리의 다른 글

Dynamodb Index  (0) 2016.01.25
DynamoDB Operator  (0) 2016.01.24
Cross Domain AJAX  (0) 2016.01.21
AWS boto accessKey, secretKey  (0) 2015.11.18
boto dynamodb2 사용하기  (0) 2015.11.18