From 112484510dacb74634a6a041d03bd9556f88b3ba Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Fri, 29 Jan 2016 19:11:18 +0000 Subject: [PATCH 01/28] updating web doc to clarify use of async workers --- omero/sysadmins/customization.txt | 2 + .../unix/install-web/install-nginx.txt | 52 ++++++++++++++----- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/omero/sysadmins/customization.txt b/omero/sysadmins/customization.txt index 79f23d934c..34b2adbc57 100644 --- a/omero/sysadmins/customization.txt +++ b/omero/sysadmins/customization.txt @@ -105,6 +105,8 @@ the clients should not display .. figure:: /images/disableScripts.png +.. _download_restrictions: + Download restrictions --------------------- diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index e5749742c2..5cad1a66b7 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -13,18 +13,17 @@ Nginx Gunicorn configuration (Unix/Linux) see :ref:`python-requirements` on the :doc:`/sysadmins/version-requirements` page. -Install `Django 1.8`_ and `Gunicorn `_ using -package requirements file: +Install `Django 1.8`_, +`Gunicorn >= 19.3 `_ +and `Gevent >= 0.13 `_ using package requirements file: :: $ pip install -r share/web/requirements-py27-nginx.txt - .. note:: For more details refer to - :djangodoc:`how to install Django 1.8 ` - or :djangodoc:`hot to upgrade Django to 1.8 `. - + :djangodoc:`how to install Django 1.8 ` + or :djangodoc:`hot to upgrade Django to 1.8 `. If you have installed Nginx, OMERO can automatically generate a configuration file for your web server. The location of the file @@ -32,12 +31,6 @@ will depend on your system, please refer to your web server's manual. See :ref:`customizing_your_omero_web_installation_unix` for additional customization options. -Install `gunicorn `_: - -:: - - $ pip install gunicorn - To create a site configuration file for inclusion in a system-wide nginx configuration redirect the output of the following command into a file: @@ -65,7 +58,7 @@ configuration redirect the output of the following command into a file: To configure an HTTPS server follow `the nginx documentation `_. -Start the Gunicorn worker processes running one thread listening on 127.0.0.1:4080: +Start the Gunicorn asyncronious worker processes listening by default on 127.0.0.1:4080: :: @@ -107,3 +100,36 @@ following commands: $ bin/omero web stop Stopping OMERO.web... [OK] Django WSGI workers (PID 59217) killed. + + +Troubleshooting +--------------- + +OMERO.web not responding +^^^^^^^^^^^^^^^^^^^^^^^^ + +:: + + [CRITICAL] WORKER TIMEOUT (pid:1234) + +OMERO.web deployed with Gunicorn relies on the operating system to provide +all of the load balancing while handling requests. Scale the number of +workers starting with (2 x $num_cores) + 1 workers. For more details refer to +`Gunicorn design `_. + + +Download issues +^^^^^^^^^^^^^^^ + +By default OMERO.web allows to stream binary data from OMERO.server. +Depend of the traffic and scale of the repository you should configure +connections and speed limits on your server to avoid blocking resources. +We recomand you to run benchmark and test performance. +It is also possible to apply :ref:`download_restrictions` and +offer alternative access to binary data. + +.. note:: + Handle streaming request/responses requires proxy buffering + to turn off. For more details refer to + `Gunicorn deployment `_. + From 11aab9e582959747044a771fc402af3b193b461d Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Fri, 29 Jan 2016 19:29:06 +0000 Subject: [PATCH 02/28] adding debugging section --- omero/sysadmins/unix/install-web/install-nginx.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 5cad1a66b7..321ac84876 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -133,3 +133,14 @@ offer alternative access to binary data. to turn off. For more details refer to `Gunicorn deployment `_. + +Debbuging +^^^^^^^^^ + +To run gunicorn in debug mode set +`Gunicorn logging `_ +using :property:`omero.web.wsgi_args`: + +:: + + $ bin/omero config set omero.web.wsgi_args -- "--log-level=DEBUG --error-logfile=/home/omero/OMERO.server/var/log/error.log". From 41192d16eeee6d98cd9408bdd215d85163b49edb Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Sat, 30 Jan 2016 20:39:06 +0000 Subject: [PATCH 03/28] updating text --- .../sysadmins/unix/install-web/install-nginx.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 321ac84876..7ff407d6ab 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -118,13 +118,14 @@ workers starting with (2 x $num_cores) + 1 workers. For more details refer to `Gunicorn design `_. -Download issues -^^^^^^^^^^^^^^^ - -By default OMERO.web allows to stream binary data from OMERO.server. -Depend of the traffic and scale of the repository you should configure -connections and speed limits on your server to avoid blocking resources. -We recomand you to run benchmark and test performance. +Download limitations +^^^^^^^^^^^^^^^^^^^^ + +OMERO.web is able to handle multiple clients on a single worker +thread switching context as necessary while streaming binary data from +OMERO.server. Depends on the traffic and scale of the repository you should +configure connections and speed limits on your server to avoid blocking +resources. We recomand you to run benchmark and test performance. It is also possible to apply :ref:`download_restrictions` and offer alternative access to binary data. From 73643a3539820fd3618dd1987a724e5c723e2d3c Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Fri, 5 Feb 2016 11:05:24 +0000 Subject: [PATCH 04/28] more fixes --- omero/sysadmins/unix/install-web/install-nginx.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 7ff407d6ab..02e37ec015 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -134,11 +134,14 @@ offer alternative access to binary data. to turn off. For more details refer to `Gunicorn deployment `_. +.. note:: + :property:`omero.web.application_server.max_requests` should be set to 0 + Debbuging ^^^^^^^^^ -To run gunicorn in debug mode set +To run gunicorn in a debug mode set `Gunicorn logging `_ using :property:`omero.web.wsgi_args`: From 9075271d868b93dcf96a30ce60dbcc27bce514b6 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Sun, 7 Feb 2016 11:59:42 +0000 Subject: [PATCH 05/28] improving web deployment documentation adding benchmark and trouble shooting --- .../unix/install-web/install-nginx.txt | 280 ++++++++++++++---- 1 file changed, 228 insertions(+), 52 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 02e37ec015..7a8d71de33 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -1,11 +1,6 @@ OMERO.web Nginx and Gunicorn deployment (Unix/Linux) ==================================================== -.. _nginx_gunicorn_wsgi_configuration: - -Nginx Gunicorn configuration (Unix/Linux) ------------------------------------------ - .. note:: Since OMERO 5.2, the OMERO.web framework no longer bundles a copy of the Django package, instead manual installation of the Django dependency is required. It is highly recommended to use @@ -13,9 +8,14 @@ Nginx Gunicorn configuration (Unix/Linux) see :ref:`python-requirements` on the :doc:`/sysadmins/version-requirements` page. +.. _gunicorn_default_configuration: + +Gunicorn default configuration (Unix/Linux) +------------------------------------------- + Install `Django 1.8`_, -`Gunicorn >= 19.3 `_ -and `Gevent >= 0.13 `_ using package requirements file: +`Gunicorn >= 19.3 `_ +and `futures `_ using package requirements file: :: @@ -23,7 +23,66 @@ and `Gevent >= 0.13 `_ using package requirements file: .. note:: For more details refer to :djangodoc:`how to install Django 1.8 ` - or :djangodoc:`hot to upgrade Django to 1.8 `. + or :djangodoc:`upgrade Django to 1.8 `. + + +Additional settings can be configured by the following properties: + +- :property:`omero.web.application_server.max_requests` to 500 + +- :property:`omero.web.wsgi.workers` (2 x NUM_CORES) + 1 + + .. note:: + DO NOT scale the number of workers to the number of clients + you expect to have. OMERO.web should only need 4-12 worker + processes to handle hundreds or thousands of requests per second. + +- :property:`omero.web.wsgi.threads` 2-4 x NUM_CORES the number of worker threads + for handling requests. + +- :property:`omero.web.wsgi.args` Additional arguments. For more details + check `Gunicorn Documentation `_. + +.. _gunicorn_async_configuration: + +Gunicorn asyncronious configuration (Unix/Linux) +------------------------------------------------ + +Install `Django 1.8`_, +`Gunicorn >= 19.3 `_ +and `Gevent >= 0.13 `_ using package requirements file: + +:: + + $ pip install -r share/web/requirements-py27-async-nginx.txt + +.. note:: For more details refer to + :djangodoc:`how to install Django 1.8 ` + or :djangodoc:`upgrade Django to 1.8 `. + + +Additional settings can be configured the following properties: + +- :property:`omero.web.application_server.max_requests` to 0 + +- :property:`omero.web.wsgi.workers` (2 x NUM_CORES) + 1 + + .. note:: + DO NOT scale the number of workers to the number of clients + you expect to have. OMERO.web should only need 4-12 worker + processes to handle hundreds or thousands of requests per second. + +- :property:`omero.web.wsgi.worker_connections` the maximum number + of simultaneous clients. + +- :property:`omero.web.wsgi.args` Additional arguments. For more details + check `Gunicorn Documentation `_. + + +.. _nginx_gunicorn_wsgi_configuration: + +Nginx configuration (Unix/Linux) +-------------------------------- If you have installed Nginx, OMERO can automatically generate a configuration file for your web server. The location of the file @@ -41,8 +100,8 @@ configuration redirect the output of the following command into a file: .. literalinclude:: nginx-omero.conf .. note:: - OMERO.web requires ``body_in_file_only`` adjusted in your default nginx - config because nginx must buffer incoming data. Make sure you have that + OMERO.web requires ``body_in_file_only`` adjusted in your default nginx + config because nginx must buffer incoming data. Make sure you have that set to the following config: :: @@ -58,37 +117,17 @@ configuration redirect the output of the following command into a file: To configure an HTTPS server follow `the nginx documentation `_. -Start the Gunicorn asyncronious worker processes listening by default on 127.0.0.1:4080: +Running OMERO.web (Unix/Linux) +------------------------------ + +Start the Gunicorn worker processes listening by default on 127.0.0.1:4080: :: $ bin/omero web start - ... static files copied to '/usr/local/dev/openmicroscopy/dist/lib/python/omeroweb/static'. + ... static files copied to '/home/omero/OMERO.server/lib/python/omeroweb/static'. Starting OMERO.web... [OK] -Additional settings can be configured from command line arguments: - -.. program:: omero web start - -.. option:: --workers WORKERS - - The number of worker processes for handling requests. - -.. option:: --worker-connections WORKER_CONNECTIONS - - The maximum number of simultaneous clients. - -.. note:: - Additional wsgi arguments can be set using property - :property:`omero.web.wsgi_args` - - :: - - $ bin/omero config set omero.web.wsgi_args -- "--forwarded-allow-ips=127.0.0.1" - - For more details check - `Gunicorn Documentation `_. - The Gunicorn workers are managed **separately** from other OMERO.server processes. You can check their status or stop them using the following commands: @@ -102,25 +141,11 @@ following commands: Django WSGI workers (PID 59217) killed. -Troubleshooting ---------------- - -OMERO.web not responding -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - [CRITICAL] WORKER TIMEOUT (pid:1234) - -OMERO.web deployed with Gunicorn relies on the operating system to provide -all of the load balancing while handling requests. Scale the number of -workers starting with (2 x $num_cores) + 1 workers. For more details refer to -`Gunicorn design `_. - - Download limitations ^^^^^^^^^^^^^^^^^^^^ +In order to offer users to download data from OMERO.web you have to deploy +using :ref:`gunicorn_async_configuration`. OMERO.web is able to handle multiple clients on a single worker thread switching context as necessary while streaming binary data from OMERO.server. Depends on the traffic and scale of the repository you should @@ -138,13 +163,164 @@ offer alternative access to binary data. :property:`omero.web.application_server.max_requests` should be set to 0 +.. _nginx_wsgi_benchmark: + +Benchamrk +--------- + +We run example banchmark on rendering 96 pixels thumbnail and 512 pixels plane: + +:: + + $ ab -n 5000 -c 100 https://server.openmicroscopy.org/omero/webclient/render_thumbnail/size/96/1234/ + This is ApacheBench, Version 2.3 <$Revision: 1430300 $> + Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ + Licensed to The Apache Software Foundation, http://www.apache.org/ + + Server Software: nginx/1.9.9 + Server Hostname: server.openmicroscopy.org + Server Port: 80 + + Document Path: /omero/webclient/render_thumbnail/size/96/31851/ + Document Length: 1880 bytes + + Concurrency Level: 100 + Time taken for tests: 224.488 seconds + Complete requests: 5000 + Failed requests: 0 + Write errors: 0 + Total transferred: 10450000 bytes + HTML transferred: 9400000 bytes + Requests per second: 22.27 [#/sec] (mean) + Time per request: 4489.763 [ms] (mean) + Time per request: 44.898 [ms] (mean, across all concurrent requests) + Transfer rate: 45.46 [Kbytes/sec] received + + Connection Times (ms) + min mean[+/-sd] median max + Connect: 0 0 0.3 0 3 + Processing: 435 4446 685.2 4363 7644 + Waiting: 432 4446 685.3 4362 7644 + Total: 435 4446 685.1 4363 7644 + + Percentage of the requests served within a certain time (ms) + 50% 4363 + 66% 4553 + 75% 4670 + 80% 4750 + 90% 5072 + 95% 5398 + 98% 6795 + 99% 6955 + 100% 7644 (longest request) + + +:: + + $ ab -n 5000 -c 100 http://server.openmicroscopy.org/omero/webclient/render_image/1234/20/0/ + This is ApacheBench, Version 2.3 <$Revision: 1430300 $> + Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ + Licensed to The Apache Software Foundation, http://www.apache.org/ + + Server Software: nginx/1.9.9 + Server Hostname: ola-test-c7.docker.openmicroscopy.org + Server Port: 80 + + Document Path: /omero/webclient/render_image/1234/20/0/ + Document Length: 24293 bytes + + Concurrency Level: 100 + Time taken for tests: 247.154 seconds + Complete requests: 5000 + Failed requests: 0 + Write errors: 0 + Total transferred: 122515000 bytes + HTML transferred: 121465000 bytes + Requests per second: 20.23 [#/sec] (mean) + Time per request: 4943.080 [ms] (mean) + Time per request: 49.431 [ms] (mean, across all concurrent requests) + Transfer rate: 484.09 [Kbytes/sec] received + + Connection Times (ms) + min mean[+/-sd] median max + Connect: 0 0 0.4 0 4 + Processing: 482 4898 855.3 4737 8303 + Waiting: 476 4898 855.3 4737 8303 + Total: 482 4898 855.2 4737 8303 + + Percentage of the requests served within a certain time (ms) + 50% 4737 + 66% 5041 + 75% 5250 + 80% 5397 + 90% 5862 + 95% 6621 + 98% 7301 + 99% 8062 + 100% 8303 (longest request) + + +.. _nginx_troubleshooting: + +Troubleshooting +--------------- + +In order to identify why OMERO.web is not available run: + +:: + + $ bin/omero web status + +Then consult nginx ``error.log`` and ``OMERO.server/var/log/OMEROweb.log`` + +OMERO.web runing but status says not started +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you upgraded OMERO but forgot to stop OMERO.web, proceses will be still +runing. In order to kill stale processes by hand, run: + +:: + + $ ps aux | grep /home/omero/OMERO.server/var/django.pid + +.. note:: + As Gunicorn is based on the pre-fork worker model it is enough to kill + master proces, the one with the lowest PID. + + Debbuging ^^^^^^^^^ -To run gunicorn in a debug mode set +To run WSGI server in a debug mode set `Gunicorn logging `_ using :property:`omero.web.wsgi_args`: :: $ bin/omero config set omero.web.wsgi_args -- "--log-level=DEBUG --error-logfile=/home/omero/OMERO.server/var/log/error.log". + + +OMERO.web not available HTTP 404 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Consult nginx error.log for more details. + +The most common problem appeares when default configuration for ``location /`` +is loaded prior to omeroweb.conf + +:: + + 2016/01/01 00:00:00 [error] 1234#0: *5 "/usr/share/nginx/html/webclient/login/index.html" is not found (2: No such file or directory), client: 1.2.3.4, server: localhost, request: "GET /webclient/login/ HTTP/1.1", host: "1.2.3.4" + + +OMERO.web not responding +^^^^^^^^^^^^^^^^^^^^^^^^ + +:: + + [CRITICAL] WORKER TIMEOUT (pid:1234) + +OMERO.web deployed with Gunicorn relies on the operating system to provide +all of the load balancing while handling requests. Scale the number of +workers starting with (2 x NUM_CORES) + 1 workers. For more details refer to +`Gunicorn design `_. From a3945d54fcdda2b8aa7618a2e50f2843ed1237c3 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Sun, 7 Feb 2016 13:46:47 +0000 Subject: [PATCH 06/28] updating note --- omero/sysadmins/unix/install-web/install-nginx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 7a8d71de33..f46a11fe58 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -35,7 +35,7 @@ Additional settings can be configured by the following properties: .. note:: DO NOT scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker - processes to handle hundreds or thousands of requests per second. + processes to handle many requests per second. - :property:`omero.web.wsgi.threads` 2-4 x NUM_CORES the number of worker threads for handling requests. From e7d8a106f00f679733533f7b8f953a06e9436bb7 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Sun, 7 Feb 2016 13:51:57 +0000 Subject: [PATCH 07/28] updating benchmark --- omero/sysadmins/unix/install-web/install-nginx.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index f46a11fe58..915c511536 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -168,7 +168,8 @@ offer alternative access to binary data. Benchamrk --------- -We run example banchmark on rendering 96 pixels thumbnail and 512 pixels plane: +We run example banchmark on rendering thumbnail and 512x512 pixels plane +for 100 concurent users making in total 5000 requests: :: From 0d60330db409d6d9701bad28a6fb3ce20007724b Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 10:29:08 +0000 Subject: [PATCH 08/28] unifying gunicorn doc urls --- omero/sysadmins/unix/install-web/install-nginx.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 915c511536..7279e27e00 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -41,7 +41,7 @@ Additional settings can be configured by the following properties: for handling requests. - :property:`omero.web.wsgi.args` Additional arguments. For more details - check `Gunicorn Documentation `_. + check `Gunicorn Documentation `_. .. _gunicorn_async_configuration: @@ -76,7 +76,7 @@ Additional settings can be configured the following properties: of simultaneous clients. - :property:`omero.web.wsgi.args` Additional arguments. For more details - check `Gunicorn Documentation `_. + check `Gunicorn Documentation `_. .. _nginx_gunicorn_wsgi_configuration: @@ -293,7 +293,7 @@ Debbuging ^^^^^^^^^ To run WSGI server in a debug mode set -`Gunicorn logging `_ +`Gunicorn logging `_ using :property:`omero.web.wsgi_args`: :: From af0e7080402aacd5016939bff0ede79c0fcec4ce Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 10:40:13 +0000 Subject: [PATCH 09/28] adding wsgi standard note --- omero/sysadmins/unix/install-web/install-nginx.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 7279e27e00..5e91c2bcec 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -8,6 +8,10 @@ OMERO.web Nginx and Gunicorn deployment (Unix/Linux) see :ref:`python-requirements` on the :doc:`/sysadmins/version-requirements` page. + +OMERO.web uses `Web Server Gateway Interface (WSGI)`_ as a primary deployment platform, the Python standard `PEP 3333 `_ that describes a web server communicates with web applications. + + .. _gunicorn_default_configuration: Gunicorn default configuration (Unix/Linux) From 8385374b0ff11205a285152d15490c98422bb710 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 10:56:01 +0000 Subject: [PATCH 10/28] formatting --- omero/sysadmins/unix/install-web/install-nginx.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 5e91c2bcec..f0dc72fa6b 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -9,7 +9,16 @@ OMERO.web Nginx and Gunicorn deployment (Unix/Linux) :doc:`/sysadmins/version-requirements` page. -OMERO.web uses `Web Server Gateway Interface (WSGI)`_ as a primary deployment platform, the Python standard `PEP 3333 `_ that describes a web server communicates with web applications. +OMERO.web uses +`Web Server Gateway Interface (WSGI) `_ +as a primary deployment platform, the Python standard +`PEP 3333 `_ +that describes a web server communicates with web applications. +OMERO.web deployment can be configured with synch and async workers. +Sync workers are faster and recomanded for a data reposority with +:ref:`download_restrictions`. If you wish to offer users abbility +to downlaod data you have to user async workers, read more about +:ref:`download_limitation`. .. _gunicorn_default_configuration: @@ -144,6 +153,7 @@ following commands: Stopping OMERO.web... [OK] Django WSGI workers (PID 59217) killed. +.. _download_limitation: Download limitations ^^^^^^^^^^^^^^^^^^^^ From ebb16e5ae33c68595708ca931bda7b1fc1ae0ecf Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 10:56:10 +0000 Subject: [PATCH 11/28] updating apache doc --- .../unix/install-web/install-apache.txt | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index e53e16471e..964c777f43 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -13,7 +13,16 @@ Apache 2.2+ with mod_wsgi configuration (Unix/Linux) see :ref:`python-requirements` on the :doc:`/sysadmins/version-requirements` page. -If you have installed Apache, install `mod\_wsgi `_. +OMERO.web uses +`Web Server Gateway Interface (WSGI) `_ +as a primary deployment platform, the Python standard +`PEP 3333 `_ +that describes a web server communicates with web applications. + +.. _apache_default_configuration: + +Apache default configuration (Unix/Linux) +----------------------------------------- Install `Django 1.8`_ using package requirements file: @@ -27,6 +36,13 @@ Install `Django 1.8`_ using package requirements file: or :djangodoc:`hot to upgrade Django to 1.8 `. +.. _apache_mod_wsgi_configuration: + +Apache configuration (Unix/Linux) +--------------------------------- + +If you have installed Apache, install `mod\_wsgi `_. + OMERO can automatically generate a configuration file for your web server. The location of the file will depend on your system, please refer to your web server's manual. @@ -59,4 +75,11 @@ To configure an HTTPS server follow `the Apache documentation `_. +Running OMERO.web (Unix/Linux) +------------------------------ + +OMERO.web is used in 'daemon' mode where UNIX sockets are used to communicate +between the Apache child processes and the daemon processes which are +to handle a request. + Then reload Apache. From 75bc809bcbc07b6db95588239ba5591473798cae Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 13:52:45 +0000 Subject: [PATCH 12/28] moving knows issues to troubleshooting --- omero/sysadmins/troubleshooting.txt | 29 ++++++++++++++ .../unix/install-web/install-nginx.txt | 40 +------------------ 2 files changed, 30 insertions(+), 39 deletions(-) diff --git a/omero/sysadmins/troubleshooting.txt b/omero/sysadmins/troubleshooting.txt index 722aa592de..acaac9134b 100644 --- a/omero/sysadmins/troubleshooting.txt +++ b/omero/sysadmins/troubleshooting.txt @@ -320,6 +320,8 @@ images annotated with that tag), there are a few things that may have gone wrong. See :ref:`search-failures` for more details. +.. _troubleshooting-omeroweb: + OMERO.web issues ---------------- @@ -342,6 +344,33 @@ OMERO.web did not start :ome-users:`upgrade 5.0.5 to 5.1.1 omero.web forbidden <2015-April/005316.html>` +OMERO.web runing but status says not started +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you upgraded OMERO but forgot to stop OMERO.web, proceses will be still +runing. In order to kill stale processes by hand, run: + +:: + + $ ps aux | grep /home/omero/OMERO.server/var/django.pid + +.. note:: + As Gunicorn is based on the pre-fork worker model it is enough to kill + master proces, the one with the lowest PID. + +OMERO.web not available HTTP 404 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Consult nginx error.log for more details. + +The most common problem appeares when default configuration for ``location /`` +is loaded prior to omeroweb.conf + +:: + + 2016/01/01 00:00:00 [error] 1234#0: *5 "/usr/share/nginx/html/webclient/login/index.html" is not found (2: No such file or directory), client: 1.2.3.4, server + + OMERO.web piecharts ^^^^^^^^^^^^^^^^^^^ diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index f0dc72fa6b..728652ad12 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -288,19 +288,7 @@ In order to identify why OMERO.web is not available run: Then consult nginx ``error.log`` and ``OMERO.server/var/log/OMEROweb.log`` -OMERO.web runing but status says not started -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you upgraded OMERO but forgot to stop OMERO.web, proceses will be still -runing. In order to kill stale processes by hand, run: - -:: - - $ ps aux | grep /home/omero/OMERO.server/var/django.pid - -.. note:: - As Gunicorn is based on the pre-fork worker model it is enough to kill - master proces, the one with the lowest PID. +For more details check :ref:`troubleshooting-omeroweb`. Debbuging @@ -313,29 +301,3 @@ using :property:`omero.web.wsgi_args`: :: $ bin/omero config set omero.web.wsgi_args -- "--log-level=DEBUG --error-logfile=/home/omero/OMERO.server/var/log/error.log". - - -OMERO.web not available HTTP 404 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Consult nginx error.log for more details. - -The most common problem appeares when default configuration for ``location /`` -is loaded prior to omeroweb.conf - -:: - - 2016/01/01 00:00:00 [error] 1234#0: *5 "/usr/share/nginx/html/webclient/login/index.html" is not found (2: No such file or directory), client: 1.2.3.4, server: localhost, request: "GET /webclient/login/ HTTP/1.1", host: "1.2.3.4" - - -OMERO.web not responding -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - [CRITICAL] WORKER TIMEOUT (pid:1234) - -OMERO.web deployed with Gunicorn relies on the operating system to provide -all of the load balancing while handling requests. Scale the number of -workers starting with (2 x NUM_CORES) + 1 workers. For more details refer to -`Gunicorn design `_. From bbf06f03ad6d2ab66b4ff40059a442fc5dcc58d1 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 14:24:21 +0000 Subject: [PATCH 13/28] updating apache config parameters --- .../sysadmins/unix/install-web/install-apache.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 964c777f43..b6be7bc389 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -35,6 +35,20 @@ Install `Django 1.8`_ using package requirements file: :djangodoc:`how to install Django 1.8 ` or :djangodoc:`hot to upgrade Django to 1.8 `. +Additional settings can be configured by the following properties: + +- :property:`omero.web.application_server.max_requests` to 500 + +- :property:`omero.web.wsgi.workers` (2 x NUM_CORES) + 1 + + .. note:: + DO NOT scale the number of workers to the number of clients + you expect to have. OMERO.web should only need 4-12 worker + processes to handle many requests per second. + +- :property:`omero.web.wsgi.threads` 2-4 x NUM_CORES the number of worker threads + for handling requests. + .. _apache_mod_wsgi_configuration: From c7d9502bd1c65a0957b1e4a718fa67e4419f38f7 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 14:43:38 +0000 Subject: [PATCH 14/28] fixing typos --- omero/sysadmins/troubleshooting.txt | 10 +++---- .../unix/install-web/install-apache.txt | 6 ++-- .../unix/install-web/install-nginx.txt | 28 +++++++++---------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/omero/sysadmins/troubleshooting.txt b/omero/sysadmins/troubleshooting.txt index acaac9134b..092c0211ea 100644 --- a/omero/sysadmins/troubleshooting.txt +++ b/omero/sysadmins/troubleshooting.txt @@ -344,11 +344,11 @@ OMERO.web did not start :ome-users:`upgrade 5.0.5 to 5.1.1 omero.web forbidden <2015-April/005316.html>` -OMERO.web runing but status says not started +OMERO.web running but status says not started ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you upgraded OMERO but forgot to stop OMERO.web, proceses will be still -runing. In order to kill stale processes by hand, run: +If you upgraded OMERO but forgot to stop OMERO.web, processes will be still +running. In order to kill stale processes by hand, run: :: @@ -356,14 +356,14 @@ runing. In order to kill stale processes by hand, run: .. note:: As Gunicorn is based on the pre-fork worker model it is enough to kill - master proces, the one with the lowest PID. + master process, the one with the lowest PID. OMERO.web not available HTTP 404 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Consult nginx error.log for more details. -The most common problem appeares when default configuration for ``location /`` +The most common problem appears when default configuration for ``location /`` is loaded prior to omeroweb.conf :: diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index b6be7bc389..4b7093b679 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -17,7 +17,7 @@ OMERO.web uses `Web Server Gateway Interface (WSGI) `_ as a primary deployment platform, the Python standard `PEP 3333 `_ -that describes a web server communicates with web applications. +that describes how a web server communicates with web applications. .. _apache_default_configuration: @@ -94,6 +94,4 @@ Running OMERO.web (Unix/Linux) OMERO.web is used in 'daemon' mode where UNIX sockets are used to communicate between the Apache child processes and the daemon processes which are -to handle a request. - -Then reload Apache. +to handle a request. Reload Apache. diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 728652ad12..b90834aa0f 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -13,11 +13,11 @@ OMERO.web uses `Web Server Gateway Interface (WSGI) `_ as a primary deployment platform, the Python standard `PEP 3333 `_ -that describes a web server communicates with web applications. +that describes how a web server communicates with web applications. OMERO.web deployment can be configured with synch and async workers. -Sync workers are faster and recomanded for a data reposority with -:ref:`download_restrictions`. If you wish to offer users abbility -to downlaod data you have to user async workers, read more about +Sync workers are faster and recommended for a data reposority with +:ref:`download_restrictions`. If you wish to offer users the ability +to download data you have to use async workers, read more about :ref:`download_limitation`. @@ -158,19 +158,19 @@ following commands: Download limitations ^^^^^^^^^^^^^^^^^^^^ -In order to offer users to download data from OMERO.web you have to deploy -using :ref:`gunicorn_async_configuration`. +In order to offer users the ability to download data from OMERO.web you have +to deploy using :ref:`gunicorn_async_configuration`. OMERO.web is able to handle multiple clients on a single worker thread switching context as necessary while streaming binary data from -OMERO.server. Depends on the traffic and scale of the repository you should +OMERO.server. Depending on the traffic and scale of the repository you should configure connections and speed limits on your server to avoid blocking -resources. We recomand you to run benchmark and test performance. +resources. We recommend you run benchmark and performance tests. It is also possible to apply :ref:`download_restrictions` and offer alternative access to binary data. .. note:: - Handle streaming request/responses requires proxy buffering - to turn off. For more details refer to + Handling streaming request/responses requires proxy buffering + to be turned off. For more details refer to `Gunicorn deployment `_. .. note:: @@ -179,11 +179,11 @@ offer alternative access to binary data. .. _nginx_wsgi_benchmark: -Benchamrk +Benchmark --------- -We run example banchmark on rendering thumbnail and 512x512 pixels plane -for 100 concurent users making in total 5000 requests: +We run example banchmarks on rendering thumbnail and 512x512 pixels plane +for 100 concurrent users making in total 5000 requests: :: @@ -291,7 +291,7 @@ Then consult nginx ``error.log`` and ``OMERO.server/var/log/OMEROweb.log`` For more details check :ref:`troubleshooting-omeroweb`. -Debbuging +Debugging ^^^^^^^^^ To run WSGI server in a debug mode set From 7006c90602edac8a12b9b153f340b590af5602ac Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Mon, 8 Feb 2016 19:37:07 +0000 Subject: [PATCH 15/28] Title underline too short. --- omero/sysadmins/troubleshooting.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/sysadmins/troubleshooting.txt b/omero/sysadmins/troubleshooting.txt index 092c0211ea..549d1a1236 100644 --- a/omero/sysadmins/troubleshooting.txt +++ b/omero/sysadmins/troubleshooting.txt @@ -345,7 +345,7 @@ OMERO.web did not start :ome-users:`upgrade 5.0.5 to 5.1.1 omero.web forbidden <2015-April/005316.html>` OMERO.web running but status says not started -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you upgraded OMERO but forgot to stop OMERO.web, processes will be still running. In order to kill stale processes by hand, run: From 0ab8184c0889d2f74e27a90e7d33851f7f93e5ff Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Tue, 9 Feb 2016 09:39:55 +0000 Subject: [PATCH 16/28] fixing typos pointed by @mtbc --- omero/sysadmins/troubleshooting.txt | 2 +- omero/sysadmins/unix/install-web/install-nginx.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/omero/sysadmins/troubleshooting.txt b/omero/sysadmins/troubleshooting.txt index 549d1a1236..7e2ea04447 100644 --- a/omero/sysadmins/troubleshooting.txt +++ b/omero/sysadmins/troubleshooting.txt @@ -356,7 +356,7 @@ running. In order to kill stale processes by hand, run: .. note:: As Gunicorn is based on the pre-fork worker model it is enough to kill - master process, the one with the lowest PID. + the master process, the one with the lowest PID. OMERO.web not available HTTP 404 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index b90834aa0f..b78c8423bb 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -14,8 +14,8 @@ OMERO.web uses as a primary deployment platform, the Python standard `PEP 3333 `_ that describes how a web server communicates with web applications. -OMERO.web deployment can be configured with synch and async workers. -Sync workers are faster and recommended for a data reposority with +OMERO.web deployment can be configured with sync and async workers. +Sync workers are faster and recommended for a data repository with :ref:`download_restrictions`. If you wish to offer users the ability to download data you have to use async workers, read more about :ref:`download_limitation`. @@ -294,7 +294,7 @@ For more details check :ref:`troubleshooting-omeroweb`. Debugging ^^^^^^^^^ -To run WSGI server in a debug mode set +To run WSGI server in a debug mode set the `Gunicorn logging `_ using :property:`omero.web.wsgi_args`: From e1963958103e6a4693b51b8a1427d8dff68fc937 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Tue, 9 Feb 2016 13:35:29 +0000 Subject: [PATCH 17/28] minor fixes --- omero/sysadmins/unix/install-web/install-nginx.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index b78c8423bb..f79f8e3620 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -53,7 +53,7 @@ Additional settings can be configured by the following properties: - :property:`omero.web.wsgi.threads` 2-4 x NUM_CORES the number of worker threads for handling requests. -- :property:`omero.web.wsgi.args` Additional arguments. For more details +- :property:`omero.web.wsgi_args` Additional arguments. For more details check `Gunicorn Documentation `_. .. _gunicorn_async_configuration: @@ -88,7 +88,7 @@ Additional settings can be configured the following properties: - :property:`omero.web.wsgi.worker_connections` the maximum number of simultaneous clients. -- :property:`omero.web.wsgi.args` Additional arguments. For more details +- :property:`omero.web.wsgi_args` Additional arguments. For more details check `Gunicorn Documentation `_. @@ -238,7 +238,7 @@ for 100 concurrent users making in total 5000 requests: Licensed to The Apache Software Foundation, http://www.apache.org/ Server Software: nginx/1.9.9 - Server Hostname: ola-test-c7.docker.openmicroscopy.org + Server Hostname: server.openmicroscopy.org Server Port: 80 Document Path: /omero/webclient/render_image/1234/20/0/ From 8a10e9ebb25741b477282b5bcb4bbd6003290046 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 10 Feb 2016 14:22:35 +0000 Subject: [PATCH 18/28] addressing @rleigh-dundee comments --- omero/sysadmins/troubleshooting.txt | 12 +++------ .../unix/install-web/install-apache.txt | 16 +++++++----- .../unix/install-web/install-nginx.txt | 26 +++++++++---------- 3 files changed, 25 insertions(+), 29 deletions(-) diff --git a/omero/sysadmins/troubleshooting.txt b/omero/sysadmins/troubleshooting.txt index 7e2ea04447..3ea263a690 100644 --- a/omero/sysadmins/troubleshooting.txt +++ b/omero/sysadmins/troubleshooting.txt @@ -347,12 +347,8 @@ OMERO.web did not start OMERO.web running but status says not started ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you upgraded OMERO but forgot to stop OMERO.web, processes will be still -running. In order to kill stale processes by hand, run: - -:: - - $ ps aux | grep /home/omero/OMERO.server/var/django.pid +If you upgraded OMERO but forgot to stop OMERO.web, processes will still be +running. In order to kill stale processes by hand, run:: $ ps aux | grep /home/omero/OMERO.server/var/django.pid .. note:: As Gunicorn is based on the pre-fork worker model it is enough to kill @@ -361,9 +357,9 @@ running. In order to kill stale processes by hand, run: OMERO.web not available HTTP 404 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Consult nginx error.log for more details. +Consult nginx :file:`error.log` for more details. -The most common problem appears when default configuration for ``location /`` +The most common problem appears when the default configuration for ``location /`` is loaded prior to omeroweb.conf :: diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 4b7093b679..cb9e66610d 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -13,9 +13,9 @@ Apache 2.2+ with mod_wsgi configuration (Unix/Linux) see :ref:`python-requirements` on the :doc:`/sysadmins/version-requirements` page. -OMERO.web uses +OMERO.web uses the `Web Server Gateway Interface (WSGI) `_ -as a primary deployment platform, the Python standard +as a primary deployment platform. The Python standard `PEP 3333 `_ that describes how a web server communicates with web applications. @@ -35,18 +35,18 @@ Install `Django 1.8`_ using package requirements file: :djangodoc:`how to install Django 1.8 ` or :djangodoc:`hot to upgrade Django to 1.8 `. -Additional settings can be configured by the following properties: +Additional settings can be configured by changing the following properties: - :property:`omero.web.application_server.max_requests` to 500 -- :property:`omero.web.wsgi.workers` (2 x NUM_CORES) + 1 +- :property:`omero.web.wsgi.workers` to (2 x NUM_CORES) + 1 .. note:: - DO NOT scale the number of workers to the number of clients + **Do not** scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second. -- :property:`omero.web.wsgi.threads` 2-4 x NUM_CORES the number of worker threads +- :property:`omero.web.wsgi.threads` to 2—4 x NUM_CORES the number of worker threads for handling requests. @@ -88,10 +88,12 @@ configuration redirect the output of the following command into a file: To configure an HTTPS server follow `the Apache documentation `_. +Then reload Apache. + Running OMERO.web (Unix/Linux) ------------------------------ OMERO.web is used in 'daemon' mode where UNIX sockets are used to communicate between the Apache child processes and the daemon processes which are -to handle a request. Reload Apache. +to handle a request. diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index f79f8e3620..ba17340a95 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -9,15 +9,15 @@ OMERO.web Nginx and Gunicorn deployment (Unix/Linux) :doc:`/sysadmins/version-requirements` page. -OMERO.web uses +OMERO.web uses the `Web Server Gateway Interface (WSGI) `_ -as a primary deployment platform, the Python standard +as a primary deployment platform. The Python standard `PEP 3333 `_ that describes how a web server communicates with web applications. OMERO.web deployment can be configured with sync and async workers. Sync workers are faster and recommended for a data repository with :ref:`download_restrictions`. If you wish to offer users the ability -to download data you have to use async workers, read more about +to download data then you have to use async workers; read more about :ref:`download_limitation`. @@ -28,7 +28,7 @@ Gunicorn default configuration (Unix/Linux) Install `Django 1.8`_, `Gunicorn >= 19.3 `_ -and `futures `_ using package requirements file: +and `futures `_ using the package requirements file: :: @@ -39,18 +39,18 @@ and `futures `_ using package requirements or :djangodoc:`upgrade Django to 1.8 `. -Additional settings can be configured by the following properties: +Additional settings can be configured by changing the following properties: - :property:`omero.web.application_server.max_requests` to 500 -- :property:`omero.web.wsgi.workers` (2 x NUM_CORES) + 1 +- :property:`omero.web.wsgi.workers` to (2 x NUM_CORES) + 1 .. note:: DO NOT scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second. -- :property:`omero.web.wsgi.threads` 2-4 x NUM_CORES the number of worker threads +- :property:`omero.web.wsgi.threads` to 2-4 x NUM_CORES the number of worker threads for handling requests. - :property:`omero.web.wsgi_args` Additional arguments. For more details @@ -63,7 +63,7 @@ Gunicorn asyncronious configuration (Unix/Linux) Install `Django 1.8`_, `Gunicorn >= 19.3 `_ -and `Gevent >= 0.13 `_ using package requirements file: +and `Gevent >= 0.13 `_ using the package requirements file: :: @@ -182,10 +182,8 @@ offer alternative access to binary data. Benchmark --------- -We run example banchmarks on rendering thumbnail and 512x512 pixels plane -for 100 concurrent users making in total 5000 requests: - -:: +We run example banchmarks on rendering thumbnails and 512x512 pixels planes +for 100 concurrent users making 5000 requests in total:: $ ab -n 5000 -c 100 https://server.openmicroscopy.org/omero/webclient/render_thumbnail/size/96/1234/ This is ApacheBench, Version 2.3 <$Revision: 1430300 $> @@ -286,7 +284,7 @@ In order to identify why OMERO.web is not available run: $ bin/omero web status -Then consult nginx ``error.log`` and ``OMERO.server/var/log/OMEROweb.log`` +Then consult nginx :file:`error.log` and :file:`OMERO.server/var/log/OMEROweb.log` For more details check :ref:`troubleshooting-omeroweb`. @@ -294,7 +292,7 @@ For more details check :ref:`troubleshooting-omeroweb`. Debugging ^^^^^^^^^ -To run WSGI server in a debug mode set the +To run the WSGI server in debug mode, enable `Gunicorn logging `_ using :property:`omero.web.wsgi_args`: From da8e77ca4900edc650553e455809e75267bfa3aa Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 10 Feb 2016 16:20:07 +0000 Subject: [PATCH 19/28] fixing properties --- omero/sysadmins/unix/install-web/install-apache.txt | 4 ++-- omero/sysadmins/unix/install-web/install-nginx.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index cb9e66610d..4a05daadf3 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -39,14 +39,14 @@ Additional settings can be configured by changing the following properties: - :property:`omero.web.application_server.max_requests` to 500 -- :property:`omero.web.wsgi.workers` to (2 x NUM_CORES) + 1 +- :property:`omero.web.wsgi_workers` to (2 x NUM_CORES) + 1 .. note:: **Do not** scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second. -- :property:`omero.web.wsgi.threads` to 2—4 x NUM_CORES the number of worker threads +- :property:`omero.web.wsgi_threads` to 2—4 x NUM_CORES the number of worker threads for handling requests. diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index ba17340a95..ae36c2795b 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -43,14 +43,14 @@ Additional settings can be configured by changing the following properties: - :property:`omero.web.application_server.max_requests` to 500 -- :property:`omero.web.wsgi.workers` to (2 x NUM_CORES) + 1 +- :property:`omero.web.wsgi_workers` to (2 x NUM_CORES) + 1 .. note:: DO NOT scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second. -- :property:`omero.web.wsgi.threads` to 2-4 x NUM_CORES the number of worker threads +- :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads for handling requests. - :property:`omero.web.wsgi_args` Additional arguments. For more details @@ -78,7 +78,7 @@ Additional settings can be configured the following properties: - :property:`omero.web.application_server.max_requests` to 0 -- :property:`omero.web.wsgi.workers` (2 x NUM_CORES) + 1 +- :property:`omero.web.wsgi_workers` (2 x NUM_CORES) + 1 .. note:: DO NOT scale the number of workers to the number of clients From 42522871279b89008d7a7ef89ea789334c6c6039 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Tue, 16 Feb 2016 16:31:18 +0000 Subject: [PATCH 20/28] update experimental features --- .../unix/install-web/install-nginx.txt | 85 ++++++++++++------- 1 file changed, 52 insertions(+), 33 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index ae36c2795b..d162aeb140 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -14,11 +14,7 @@ OMERO.web uses the as a primary deployment platform. The Python standard `PEP 3333 `_ that describes how a web server communicates with web applications. -OMERO.web deployment can be configured with sync and async workers. -Sync workers are faster and recommended for a data repository with -:ref:`download_restrictions`. If you wish to offer users the ability -to download data then you have to use async workers; read more about -:ref:`download_limitation`. + .. _gunicorn_default_configuration: @@ -26,9 +22,8 @@ to download data then you have to use async workers; read more about Gunicorn default configuration (Unix/Linux) ------------------------------------------- -Install `Django 1.8`_, -`Gunicorn >= 19.3 `_ -and `futures `_ using the package requirements file: +Install `Django 1.8`_ and `Gunicorn >= 19.3 `_ +using the package requirements file: :: @@ -46,50 +41,74 @@ Additional settings can be configured by changing the following properties: - :property:`omero.web.wsgi_workers` to (2 x NUM_CORES) + 1 .. note:: - DO NOT scale the number of workers to the number of clients + **Do not** scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second. -- :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads - for handling requests. - - :property:`omero.web.wsgi_args` Additional arguments. For more details check `Gunicorn Documentation `_. -.. _gunicorn_async_configuration: +.. _gunicorn_advance_configuration: + +EXPERIMENTAL: Gunicorn advance configuration (Unix/Linux) +--------------------------------------------------------- -Gunicorn asyncronious configuration (Unix/Linux) ------------------------------------------------- +.. note:: This section is experimental and still under development + +OMERO.web deployment can be configured with sync and async workers. +Sync workers are faster and recommended for a data repository with +:ref:`download_restrictions`. If you wish to offer users the ability +to download data then you have to use async workers; read more about +:ref:`download_limitation`. + + +.. _gunicorn_sync_configuration: + +Sync workers +^^^^^^^^^^^^ + +- Install `futures `_ :: + + $ pip install futures + +Additional settings can be configured by changing the following properties: + +- :property:`omero.web.wsgi_worker_class` unset + +- :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads + for handling requests. -Install `Django 1.8`_, -`Gunicorn >= 19.3 `_ -and `Gevent >= 0.13 `_ using the package requirements file: :: - $ pip install -r share/web/requirements-py27-async-nginx.txt + $ bin/omero config set omero.web.wsgi_worker_class + $ bin/omero config set omero.web.wsgi_threads 10 -.. note:: For more details refer to - :djangodoc:`how to install Django 1.8 ` - or :djangodoc:`upgrade Django to 1.8 `. +.. _gunicorn_async_configuration: -Additional settings can be configured the following properties: +Async workers +^^^^^^^^^^^^^ -- :property:`omero.web.application_server.max_requests` to 0 +- Install `Gevent >= 0.13 `_ :: -- :property:`omero.web.wsgi_workers` (2 x NUM_CORES) + 1 + $ pip install gevent - .. note:: - DO NOT scale the number of workers to the number of clients - you expect to have. OMERO.web should only need 4-12 worker - processes to handle hundreds or thousands of requests per second. +Additional settings can be configured by changing the following properties: -- :property:`omero.web.wsgi.worker_connections` the maximum number - of simultaneous clients. -- :property:`omero.web.wsgi_args` Additional arguments. For more details - check `Gunicorn Documentation `_. +- :property:`omero.web.wsgi_worker_class` to gevent + +- :property:`omero.web.wsgi_worker_connections` to 2-4 x NUM_CORES the number of worker threads + for handling requests. + +- :property:`omero.web.application_server.max_requests` to 0 + +:: + + $ bin/omero config set omero.web.wsgi_worker_class gevent + $ bin/omero config set omero.web.wsgi_worker_connections 1000 + $ bin/omero config set omero.web.application_server.max_requests 0 .. _nginx_gunicorn_wsgi_configuration: From a857235f6ccea34f91b65819becd8f705e2c8838 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Tue, 16 Feb 2016 16:48:33 +0000 Subject: [PATCH 21/28] minor fixes --- omero/sysadmins/troubleshooting.txt | 4 +++- .../unix/install-web/install-nginx.txt | 24 ++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/omero/sysadmins/troubleshooting.txt b/omero/sysadmins/troubleshooting.txt index 3ea263a690..13a0fae055 100644 --- a/omero/sysadmins/troubleshooting.txt +++ b/omero/sysadmins/troubleshooting.txt @@ -348,7 +348,9 @@ OMERO.web running but status says not started ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you upgraded OMERO but forgot to stop OMERO.web, processes will still be -running. In order to kill stale processes by hand, run:: $ ps aux | grep /home/omero/OMERO.server/var/django.pid +running. In order to kill stale processes by hand, run:: + + $ ps aux | grep /home/omero/OMERO.server/var/django.pid .. note:: As Gunicorn is based on the pre-fork worker model it is enough to kill diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index d162aeb140..a94bc3b38e 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -61,11 +61,13 @@ Sync workers are faster and recommended for a data repository with to download data then you have to use async workers; read more about :ref:`download_limitation`. +For more details refer to +`Gunicorn design `_. .. _gunicorn_sync_configuration: -Sync workers -^^^^^^^^^^^^ +EXPERIMENTAL: Sync workers +^^^^^^^^^^^^^^^^^^^^^^^^^^ - Install `futures `_ :: @@ -76,10 +78,7 @@ Additional settings can be configured by changing the following properties: - :property:`omero.web.wsgi_worker_class` unset - :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads - for handling requests. - - -:: + for handling requests:: $ bin/omero config set omero.web.wsgi_worker_class $ bin/omero config set omero.web.wsgi_threads 10 @@ -87,8 +86,8 @@ Additional settings can be configured by changing the following properties: .. _gunicorn_async_configuration: -Async workers -^^^^^^^^^^^^^ +EXPERIMENTAL: Async workers +^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Install `Gevent >= 0.13 `_ :: @@ -99,12 +98,9 @@ Additional settings can be configured by changing the following properties: - :property:`omero.web.wsgi_worker_class` to gevent -- :property:`omero.web.wsgi_worker_connections` to 2-4 x NUM_CORES the number of worker threads - for handling requests. +- :property:`omero.web.wsgi_worker_connections` to 1000 -- :property:`omero.web.application_server.max_requests` to 0 - -:: +- :property:`omero.web.application_server.max_requests` to 0:: $ bin/omero config set omero.web.wsgi_worker_class gevent $ bin/omero config set omero.web.wsgi_worker_connections 1000 @@ -201,7 +197,7 @@ offer alternative access to binary data. Benchmark --------- -We run example banchmarks on rendering thumbnails and 512x512 pixels planes +We run example benchmarks on rendering thumbnails and 512x512 pixels planes for 100 concurrent users making 5000 requests in total:: $ ab -n 5000 -c 100 https://server.openmicroscopy.org/omero/webclient/render_thumbnail/size/96/1234/ From 00399e112b23e2d8cbdee1b140da18d5daec975e Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Thu, 18 Feb 2016 09:42:04 +0000 Subject: [PATCH 22/28] moving experimental to the bottom --- .../unix/install-web/install-nginx.txt | 119 +++++++++--------- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index a94bc3b38e..45a3cec338 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -48,65 +48,6 @@ Additional settings can be configured by changing the following properties: - :property:`omero.web.wsgi_args` Additional arguments. For more details check `Gunicorn Documentation `_. -.. _gunicorn_advance_configuration: - -EXPERIMENTAL: Gunicorn advance configuration (Unix/Linux) ---------------------------------------------------------- - -.. note:: This section is experimental and still under development - -OMERO.web deployment can be configured with sync and async workers. -Sync workers are faster and recommended for a data repository with -:ref:`download_restrictions`. If you wish to offer users the ability -to download data then you have to use async workers; read more about -:ref:`download_limitation`. - -For more details refer to -`Gunicorn design `_. - -.. _gunicorn_sync_configuration: - -EXPERIMENTAL: Sync workers -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- Install `futures `_ :: - - $ pip install futures - -Additional settings can be configured by changing the following properties: - -- :property:`omero.web.wsgi_worker_class` unset - -- :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads - for handling requests:: - - $ bin/omero config set omero.web.wsgi_worker_class - $ bin/omero config set omero.web.wsgi_threads 10 - - -.. _gunicorn_async_configuration: - -EXPERIMENTAL: Async workers -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- Install `Gevent >= 0.13 `_ :: - - $ pip install gevent - -Additional settings can be configured by changing the following properties: - - -- :property:`omero.web.wsgi_worker_class` to gevent - -- :property:`omero.web.wsgi_worker_connections` to 1000 - -- :property:`omero.web.application_server.max_requests` to 0:: - - $ bin/omero config set omero.web.wsgi_worker_class gevent - $ bin/omero config set omero.web.wsgi_worker_connections 1000 - $ bin/omero config set omero.web.application_server.max_requests 0 - - .. _nginx_gunicorn_wsgi_configuration: Nginx configuration (Unix/Linux) @@ -314,3 +255,63 @@ using :property:`omero.web.wsgi_args`: :: $ bin/omero config set omero.web.wsgi_args -- "--log-level=DEBUG --error-logfile=/home/omero/OMERO.server/var/log/error.log". + + +.. _gunicorn_advance_configuration: + +EXPERIMENTAL: Gunicorn advance configuration (Unix/Linux) +--------------------------------------------------------- + +.. note:: This section is experimental and still under development + +OMERO.web deployment can be configured with sync and async workers. +Sync workers are faster and recommended for a data repository with +:ref:`download_restrictions`. If you wish to offer users the ability +to download data then you have to use async workers; read more about +:ref:`download_limitation`. + +For more details refer to +`Gunicorn design `_. + +.. _gunicorn_sync_configuration: + +EXPERIMENTAL: Sync workers +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Install `futures `_ :: + + $ pip install futures + +Additional settings can be configured by changing the following properties: + +- :property:`omero.web.wsgi_worker_class` unset + +- :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads + for handling requests:: + + $ bin/omero config set omero.web.wsgi_worker_class + $ bin/omero config set omero.web.wsgi_threads 10 + + +.. _gunicorn_async_configuration: + +EXPERIMENTAL: Async workers +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Install `Gevent >= 0.13 `_ :: + + $ pip install gevent + +Additional settings can be configured by changing the following properties: + + +- :property:`omero.web.wsgi_worker_class` to gevent + +- :property:`omero.web.wsgi_worker_connections` to 1000 + +- :property:`omero.web.application_server.max_requests` to 0:: + + $ bin/omero config set omero.web.wsgi_worker_class gevent + $ bin/omero config set omero.web.wsgi_worker_connections 1000 + $ bin/omero config set omero.web.application_server.max_requests 0 + From bf4120b77f6bdad8db6b74cc71a6cbaeffe4da23 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 24 Feb 2016 11:52:21 +0000 Subject: [PATCH 23/28] add nginx link --- omero/sysadmins/unix/install-web/install-nginx.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 45a3cec338..2caf245e31 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -127,7 +127,9 @@ offer alternative access to binary data. .. note:: Handling streaming request/responses requires proxy buffering to be turned off. For more details refer to - `Gunicorn deployment `_. + `Gunicorn deployment `_ + and + `Nginx configuration `_. .. note:: :property:`omero.web.application_server.max_requests` should be set to 0 From 8b1053c95362b0645dcb088228d4763d0112abce Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 24 Feb 2016 16:27:34 +0000 Subject: [PATCH 24/28] updating doc --- .../unix/install-web/install-apache.txt | 20 +++++++++++-- .../unix/install-web/install-nginx.txt | 29 +++++++++---------- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 4a05daadf3..40086aa3e2 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -46,8 +46,24 @@ Additional settings can be configured by changing the following properties: you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second. -- :property:`omero.web.wsgi_threads` to 2—4 x NUM_CORES the number of worker threads - for handling requests. + +EXPERIMENTAL: +^^^^^^^^^^^^^ + +.. note:: experimental configuration are not ready for production use. + Configuration may change. Features may not work properly. + + +Apache can operate in a different modes dependents on the platform and +configuration. Which MPM is being used can be determined from the ‘Server MPM’ +field by running the Apache web server executable with the ‘-V’ option. + +Additional settings can be configured by changing the following properties: + +- `omero.web.wsgi_threads` number of concurrent requests each process can + handle:: + + $ bin/omero config set omero.web.wsgi_threads $(2-4 x NUM_CORES) .. _apache_mod_wsgi_configuration: diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 2caf245e31..394da05035 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -264,6 +264,9 @@ using :property:`omero.web.wsgi_args`: EXPERIMENTAL: Gunicorn advance configuration (Unix/Linux) --------------------------------------------------------- +.. note:: Experimental configuration are not ready for production use. + Configuration may change. Features may not work properly. + .. note:: This section is experimental and still under development OMERO.web deployment can be configured with sync and async workers. @@ -280,19 +283,18 @@ For more details refer to EXPERIMENTAL: Sync workers ^^^^^^^^^^^^^^^^^^^^^^^^^^ -- Install `futures `_ :: +.. note:: Experimental configuration are not ready for production use. + Configuration may change. Features may not work properly. - $ pip install futures -Additional settings can be configured by changing the following properties: +- Install `futures `_ :: -- :property:`omero.web.wsgi_worker_class` unset + $ pip install futures -- :property:`omero.web.wsgi_threads` to 2-4 x NUM_CORES the number of worker threads - for handling requests:: +Additional settings can be configured by changing the following properties:: $ bin/omero config set omero.web.wsgi_worker_class - $ bin/omero config set omero.web.wsgi_threads 10 + $ bin/omero config set omero.web.wsgi_threads $(2-4 x NUM_CORES) .. _gunicorn_async_configuration: @@ -300,18 +302,15 @@ Additional settings can be configured by changing the following properties: EXPERIMENTAL: Async workers ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- Install `Gevent >= 0.13 `_ :: - - $ pip install gevent - -Additional settings can be configured by changing the following properties: +.. note:: experimental configuration are not ready for production use. + Configuration may change. Features may not work properly. -- :property:`omero.web.wsgi_worker_class` to gevent +- Install `Gevent >= 0.13 `_ :: -- :property:`omero.web.wsgi_worker_connections` to 1000 + $ pip install "gevent>=0.13" -- :property:`omero.web.application_server.max_requests` to 0:: +Additional settings can be configured by changing the following properties: $ bin/omero config set omero.web.wsgi_worker_class gevent $ bin/omero config set omero.web.wsgi_worker_connections 1000 From 54ea1f96c25aa71d4c18315d60f7e4c883ff59b7 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 24 Feb 2016 16:30:00 +0000 Subject: [PATCH 25/28] fixing typo --- omero/sysadmins/unix/install-web/install-apache.txt | 2 +- omero/sysadmins/unix/install-web/install-nginx.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 40086aa3e2..4fddbe2bc6 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -50,7 +50,7 @@ Additional settings can be configured by changing the following properties: EXPERIMENTAL: ^^^^^^^^^^^^^ -.. note:: experimental configuration are not ready for production use. +.. note:: Experimental configuration are not ready for production use. Configuration may change. Features may not work properly. diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index 394da05035..f8ff137201 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -267,7 +267,6 @@ EXPERIMENTAL: Gunicorn advance configuration (Unix/Linux) .. note:: Experimental configuration are not ready for production use. Configuration may change. Features may not work properly. -.. note:: This section is experimental and still under development OMERO.web deployment can be configured with sync and async workers. Sync workers are faster and recommended for a data repository with @@ -302,7 +301,7 @@ Additional settings can be configured by changing the following properties:: EXPERIMENTAL: Async workers ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. note:: experimental configuration are not ready for production use. +.. note:: Experimental configuration are not ready for production use. Configuration may change. Features may not work properly. From e5d7044ededc8a6fceb1d11c6add0925d90bfbef Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 24 Feb 2016 16:50:50 +0000 Subject: [PATCH 26/28] more fixes --- .../sysadmins/unix/install-web/install-apache.txt | 7 ++----- .../sysadmins/unix/install-web/install-nginx.txt | 15 +++++++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 4fddbe2bc6..7ddc213437 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -50,7 +50,7 @@ Additional settings can be configured by changing the following properties: EXPERIMENTAL: ^^^^^^^^^^^^^ -.. note:: Experimental configuration are not ready for production use. +.. note:: Experimental configurations are not ready for production use. Configuration may change. Features may not work properly. @@ -58,10 +58,7 @@ Apache can operate in a different modes dependents on the platform and configuration. Which MPM is being used can be determined from the ‘Server MPM’ field by running the Apache web server executable with the ‘-V’ option. -Additional settings can be configured by changing the following properties: - -- `omero.web.wsgi_threads` number of concurrent requests each process can - handle:: +- Number of concurrent requests each process can handle:: $ bin/omero config set omero.web.wsgi_threads $(2-4 x NUM_CORES) diff --git a/omero/sysadmins/unix/install-web/install-nginx.txt b/omero/sysadmins/unix/install-web/install-nginx.txt index f8ff137201..a83c0cb4ea 100644 --- a/omero/sysadmins/unix/install-web/install-nginx.txt +++ b/omero/sysadmins/unix/install-web/install-nginx.txt @@ -264,7 +264,7 @@ using :property:`omero.web.wsgi_args`: EXPERIMENTAL: Gunicorn advance configuration (Unix/Linux) --------------------------------------------------------- -.. note:: Experimental configuration are not ready for production use. +.. note:: Experimental configurations are not ready for production use. Configuration may change. Features may not work properly. @@ -277,12 +277,13 @@ to download data then you have to use async workers; read more about For more details refer to `Gunicorn design `_. + .. _gunicorn_sync_configuration: EXPERIMENTAL: Sync workers ^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. note:: Experimental configuration are not ready for production use. +.. note:: Experimental configurations are not ready for production use. Configuration may change. Features may not work properly. @@ -290,7 +291,10 @@ EXPERIMENTAL: Sync workers $ pip install futures -Additional settings can be configured by changing the following properties:: +Additional settings can be configured by changing the following properties: + +- The number of worker threads for handling requests, see + `Gunicorn threads `_ :: $ bin/omero config set omero.web.wsgi_worker_class $ bin/omero config set omero.web.wsgi_threads $(2-4 x NUM_CORES) @@ -301,7 +305,7 @@ Additional settings can be configured by changing the following properties:: EXPERIMENTAL: Async workers ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. note:: Experimental configuration are not ready for production use. +.. note:: Experimental configurations are not ready for production use. Configuration may change. Features may not work properly. @@ -311,6 +315,9 @@ EXPERIMENTAL: Async workers Additional settings can be configured by changing the following properties: +- The maximum number of simultaneous clients, see + `Gunicorn worker-connections `_ :: + $ bin/omero config set omero.web.wsgi_worker_class gevent $ bin/omero config set omero.web.wsgi_worker_connections 1000 $ bin/omero config set omero.web.application_server.max_requests 0 From 73ff72b4fcb97cd3462abf8913dd75233abb0adc Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Wed, 24 Feb 2016 16:52:37 +0000 Subject: [PATCH 27/28] typo --- omero/sysadmins/unix/install-web/install-apache.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 7ddc213437..5fb8c425aa 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -54,7 +54,7 @@ EXPERIMENTAL: Configuration may change. Features may not work properly. -Apache can operate in a different modes dependents on the platform and +Apache can operate in a different modes depending on the platform and configuration. Which MPM is being used can be determined from the ‘Server MPM’ field by running the Apache web server executable with the ‘-V’ option. From 5195d3296bce91d8833e0f51396d0b255bed69a1 Mon Sep 17 00:00:00 2001 From: Aleksandra Tarkowska Date: Fri, 26 Feb 2016 11:00:10 +0000 Subject: [PATCH 28/28] removing apache experimental --- .../unix/install-web/install-apache.txt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/omero/sysadmins/unix/install-web/install-apache.txt b/omero/sysadmins/unix/install-web/install-apache.txt index 5fb8c425aa..a8a90a648a 100644 --- a/omero/sysadmins/unix/install-web/install-apache.txt +++ b/omero/sysadmins/unix/install-web/install-apache.txt @@ -47,22 +47,6 @@ Additional settings can be configured by changing the following properties: processes to handle many requests per second. -EXPERIMENTAL: -^^^^^^^^^^^^^ - -.. note:: Experimental configurations are not ready for production use. - Configuration may change. Features may not work properly. - - -Apache can operate in a different modes depending on the platform and -configuration. Which MPM is being used can be determined from the ‘Server MPM’ -field by running the Apache web server executable with the ‘-V’ option. - -- Number of concurrent requests each process can handle:: - - $ bin/omero config set omero.web.wsgi_threads $(2-4 x NUM_CORES) - - .. _apache_mod_wsgi_configuration: Apache configuration (Unix/Linux)