diff --git a/HISTORY.rst b/HISTORY.rst index bf7643886e..e638e77207 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,3 +1,8 @@ +3.2.4 (2019-06-XX) +================== +* Support configurable GUnicorn timeouts. Defaults to + current value of 120 seconds. + 3.2.3 (2019-06-21) ================== * Add support for disabling the random primary key diff --git a/docker/rootfs/usr/local/bin/entrypoint.sh b/docker/rootfs/usr/local/bin/entrypoint.sh index 01825e3825..733bd5c763 100755 --- a/docker/rootfs/usr/local/bin/entrypoint.sh +++ b/docker/rootfs/usr/local/bin/entrypoint.sh @@ -22,6 +22,7 @@ export MAYAN_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE:-mayan.settings.production} export MAYAN_GUNICORN_BIN=${MAYAN_PYTHON_BIN_DIR}gunicorn export MAYAN_GUNICORN_WORKERS=${MAYAN_GUNICORN_WORKERS:-2} +export MAYAN_GUNICORN_TIMEOUT=${MAYAN_GUNICORN_TIMEOUT:-120} export MAYAN_PIP_BIN=${MAYAN_PYTHON_BIN_DIR}pip export MAYAN_STATIC_ROOT=${MAYAN_INSTALL_DIR}/static diff --git a/docs/releases/3.2.4.rst b/docs/releases/3.2.4.rst new file mode 100644 index 0000000000..3220236ed3 --- /dev/null +++ b/docs/releases/3.2.4.rst @@ -0,0 +1,103 @@ +Version 3.2.4 +============= + +Released: June XX, 2019 + + +Changes +------- + +- Support configurable GUnicorn timeouts. Defaults to + current value of 120 seconds. + + +Removals +-------- + +- None + + +Upgrading from a previous version +--------------------------------- + +If installed via Python's PIP +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Remove deprecated requirements:: + + $ curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt | pip uninstall -r /dev/stdin + +Type in the console:: + + $ pip install mayan-edms==3.2.3 + +the requirements will also be updated automatically. + + +Using Git +^^^^^^^^^ + +If you installed Mayan EDMS by cloning the Git repository issue the commands:: + + $ git reset --hard HEAD + $ git pull + +otherwise download the compressed archived and uncompress it overriding the +existing installation. + +Remove deprecated requirements:: + + $ pip uninstall -y -r removals.txt + +Next upgrade/add the new requirements:: + + $ pip install --upgrade -r requirements.txt + + +Common steps +^^^^^^^^^^^^ + +Perform these steps after updating the code from either step above. + +Make a backup of your supervisord file:: + + sudo cp /etc/supervisor/conf.d/mayan.conf /etc/supervisor/conf.d/mayan.conf.bck + +Update the supervisord configuration file. Replace the environment +variables values show here with your respective settings. This step will refresh +the supervisord configuration file with the new queues and the latest +recommended layout:: + + MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \ + MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \ + MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \ + /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord > /etc/supervisor/conf.d/mayan.conf + +Edit the supervisord configuration file and update any setting the template +generator missed:: + + vi /etc/supervisor/conf.d/mayan.conf + +Migrate existing database schema with:: + + $ mayan-edms.py performupgrade + +Add new static media:: + + $ mayan-edms.py preparestatic --noinput + +The upgrade procedure is now complete. + + +Backward incompatible changes +----------------------------- + +- None + + +Bugs fixed or issues closed +--------------------------- + +- :gitlab-issue:`628` mailbox.user in POP3Email gets passed keyword argument, but only accepts "user" or positional argument + +.. _PyPI: https://pypi.python.org/pypi/mayan-edms/ diff --git a/docs/releases/index.rst b/docs/releases/index.rst index ec60a82fa4..f1a003eb4f 100644 --- a/docs/releases/index.rst +++ b/docs/releases/index.rst @@ -20,6 +20,7 @@ versions of the documentation contain the release notes for any later releases. .. toctree:: :maxdepth: 1 + 3.2.4 3.2.3 3.2.2 3.2.1 diff --git a/mayan/apps/platform/classes.py b/mayan/apps/platform/classes.py index 384dfa2fb9..1d0152442f 100644 --- a/mayan/apps/platform/classes.py +++ b/mayan/apps/platform/classes.py @@ -120,6 +120,10 @@ class PlatformTemplateSupervisord(PlatformTemplate): name='GUNICORN_WORKERS', default=2, environment_name='MAYAN_GUNICORN_WORKERS' ), + Variable( + name='GUNICORN_TIMEOUT', default=120, + environment_name='MAYAN_GUNICORN_TIMEOUT' + ), Variable( name='DATABASE_CONN_MAX_AGE', default=0, environment_name='MAYAN_DATABASE_CONN_MAX_AGE' diff --git a/mayan/apps/platform/templates/platform/supervisord.tmpl b/mayan/apps/platform/templates/platform/supervisord.tmpl index ba9645c54a..b87686c827 100644 --- a/mayan/apps/platform/templates/platform/supervisord.tmpl +++ b/mayan/apps/platform/templates/platform/supervisord.tmpl @@ -16,7 +16,7 @@ environment= [program:mayan-gunicorn] autorestart = true autostart = true -command = {{ INSTALLATION_PATH }}/bin/gunicorn -w {{ GUNICORN_WORKERS }} mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout 120 +command = {{ INSTALLATION_PATH }}/bin/gunicorn -w {{ GUNICORN_WORKERS }} mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout {{ GUNICORN_TIMEOUT }} user = mayan {% for worker in workers %} diff --git a/mayan/apps/platform/templates/platform/supervisord_docker.tmpl b/mayan/apps/platform/templates/platform/supervisord_docker.tmpl index a8b86f7c84..7cad0e0c3b 100644 --- a/mayan/apps/platform/templates/platform/supervisord_docker.tmpl +++ b/mayan/apps/platform/templates/platform/supervisord_docker.tmpl @@ -1,7 +1,7 @@ [program:mayan-gunicorn] autorestart = false autostart = true -command = /bin/bash -c "${MAYAN_GUNICORN_BIN} -w ${MAYAN_GUNICORN_WORKERS} mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE}" --timeout 120 +command = /bin/bash -c "${MAYAN_GUNICORN_BIN} -w ${MAYAN_GUNICORN_WORKERS} mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE}" --timeout ${MAYAN_GUNICORN_TIMEOUT} redirect_stderr = true stderr_logfile = /dev/fd/2 stderr_logfile_maxbytes = 0