knowledge-repo icon indicating copy to clipboard operation
knowledge-repo copied to clipboard

Update docs to mention using a thread-safe DB when deploying with Gunicorn

Open jdavidheiser opened this issue 7 years ago • 3 comments

When trying to deploy the app with gunicorn, as described in the docs,

I get the following error:

RuntimeError: Database configuration is not suitable for deployment (not thread-safe). which can be traced to the fact that Knowledge Repo defaults to using a sqlite database for the index, and it is assumed to not be thread-safe

I was able to get this working by switching the engine to Flask, and will assume that we'll eventually use a different database, but it would be helpful to mention this caveat in the instructions for deploying the app.

For reference, knowledge_repo --repo {data}~/knowledge/example_repo/ --debug deploy --port 4567 --config ~/knowledge/server_config.py

Throws the error, but knowledge_repo --repo {data}~/knowledge/example_repo/ --debug deploy --port 4567 --config ~/knowledge/server_config.py --engine flask

Does not.

Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj

jdavidheiser avatar Aug 31 '17 17:08 jdavidheiser

Thanks for the reminder to get to better documenting the knowledge_repo @jdavidheiser . We will hopefully get on this soon. Better documentation is in the works.

matthewwardrop avatar Sep 01 '17 04:09 matthewwardrop

I'm happy to help out with docs if there are specific parts you'd like contributions for - a lot of this stuff is pretty fresh in my mind since we're in the process of setting up a new deployment and figuring out how it fits in with our other tools.

jdavidheiser avatar Sep 01 '17 22:09 jdavidheiser

Actually... getting some help would be great. In particular, if you can pinpoint exactly where the existing documentation was lacking and/or confusing, along with perhaps suggestions on how to improve it, that would be great.

I have a WIP branch that splits out the documentation a bit better, but since it doesn't actually change the content (yet), your best bet might be to just submit a patch for the current README... and I'll transfer those changes into the split out documentation.

matthewwardrop avatar Sep 02 '17 05:09 matthewwardrop