Skip to content
Permalink
Browse files

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
do occur.

We may find a fix in the future.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 11, 2015
1 parent dcea899 commit 8d3117b4f4b2dde8e41077aae14ca7592420fa2f
Showing with 19 additions and 6 deletions.
  1. +0 −2 comet/web.py
  2. +19 −4 docs/admin/setup.rst
@@ -270,7 +270,6 @@ def find_post(path):
:return: A post matching the path
:rtype: Post or None
"""
scan_site()
for p in site.timeline:
if p.source_path == path:
return p
@@ -458,7 +457,6 @@ def index():
:param int all: Whether or not should show all posts
"""
scan_site()
if not os.path.exists(os.path.join(site.config["OUTPUT_FOLDER"],
'assets')):
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
=======================
Server
======

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.

uWSGI
-----

Sample uWSGI configuration:


.. code-block:: ini

[uwsgi]
@@ -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

.. note::

``python2`` may also be ``python`` this depending on your environment.

.. danger::

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)
nginx
-----

Sample nginx configuration:

0 comments on commit 8d3117b

Please sign in to comment.
You can’t perform that action at this time.