This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ban running with multiple processes
site and app.config['USERS'] change on runtime. If more than
one processes is created, many requests will fail if changes
We may find a fix in the future.
Signed-off-by: Chris Warrick <firstname.lastname@example.org>
Loading branch information
2 changed files
and 6 deletions.
@@ -270,7 +270,6 @@ def find_post(path):
:return: A post matching the path
:rtype: Post or None
for p in site. timeline:
if p. source_path == path:
@@ -458,7 +457,6 @@ def index():
:param int all: Whether or not should show all posts
if not os. path. exists( os. path. join( site. config[ "OUTPUT_FOLDER"],
return redirect( '/setup')
@@ -95,14 +95,18 @@ Permissions
Chown ``my_comet_site`` *recursively* to ``nobody``, or whatever
user Comet will run as. Comet must be able to write to this directory.
Server : uWSGI and nginx
For testing purposes, you can use ``comet devserver``. It should **NOT** be used
in production. You should use uWSGI Emperor and nginx in a real environment.
Sample uWSGI configuration:
.. code-block:: ini
@@ -118,11 +122,22 @@ Sample uWSGI configuration:
plugins = python2
uid = nobody
gid = nobody
processes = 3
processes = 1
logger = file:/var/comet/my_comet_site/uwsgi.log
``python2`` may also be ``python`` this depending on your environment.
Comet **CANNOT** be run with more than one ``process``. Otherwise, bad
things will happen as Comet changes some things during the runtime.
Supporting multiple processes would require reloading files from the
filesystem on *every request*.
( ``python2`` may also be ``python``, this depends on your environment)
Sample nginx configuration: