mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Revise uwsgi defaults and display.
In https://github.com/galaxyproject/galaxy/issues/1530 we realized that buffer-size needs to be increased for Galaxy requests. Also mention thunder-lock since that should frequently be enabled - https://github.com/galaxyproject/ansible-galaxy-extras/pull/195.
This commit is contained in:
@@ -25,12 +25,13 @@ uwsgi:
|
||||
|
||||
# By default uWSGI allocates a very small buffer (4096 bytes) for the
|
||||
# headers of each request. If you start receiving "invalid request
|
||||
# block size" in your logs, it could mean you need a bigger buffer.
|
||||
# Increase it up to 65535.
|
||||
buffer-size: 4096
|
||||
# block size" in your logs, it could mean you need a bigger buffer. We
|
||||
# recommend at least 16384.
|
||||
buffer-size: 16384
|
||||
|
||||
# Number of web server (worker) processes to fork after the
|
||||
# application has loaded.
|
||||
# application has loaded. If this is set to greater than 1, thunder-
|
||||
# lock likely should be enabled below.
|
||||
processes: 1
|
||||
|
||||
# Number of threads for each web server process.
|
||||
@@ -61,6 +62,10 @@ uwsgi:
|
||||
# Reports, etc.) that you are loading.
|
||||
module: galaxy.webapps.galaxy.buildapp:uwsgi_app()
|
||||
|
||||
# It is usually a good idea to set this to ``true`` if processes is
|
||||
# greater than 1.
|
||||
thunder-lock: false
|
||||
|
||||
# Cause uWSGI to respect the traditional behavior of dying on SIGTERM
|
||||
# (its default is to brutally reload workers)
|
||||
die-on-term: true
|
||||
|
||||
@@ -7,12 +7,13 @@ uwsgi:
|
||||
|
||||
# By default uWSGI allocates a very small buffer (4096 bytes) for the
|
||||
# headers of each request. If you start receiving "invalid request
|
||||
# block size" in your logs, it could mean you need a bigger buffer.
|
||||
# Increase it up to 65535.
|
||||
buffer-size: 4096
|
||||
# block size" in your logs, it could mean you need a bigger buffer. We
|
||||
# recommend at least 16384.
|
||||
buffer-size: 16384
|
||||
|
||||
# Number of web server (worker) processes to fork after the
|
||||
# application has loaded.
|
||||
# application has loaded. If this is set to greater than 1, thunder-
|
||||
# lock likely should be enabled below.
|
||||
processes: 1
|
||||
|
||||
# Number of threads for each web server process.
|
||||
@@ -43,6 +44,10 @@ uwsgi:
|
||||
# Reports, etc.) that you are loading.
|
||||
module: galaxy.webapps.reports.buildapp:uwsgi_app()
|
||||
|
||||
# It is usually a good idea to set this to ``true`` if processes is
|
||||
# greater than 1.
|
||||
thunder-lock: false
|
||||
|
||||
# Cause uWSGI to respect the traditional behavior of dying on SIGTERM
|
||||
# (its default is to brutally reload workers)
|
||||
die-on-term: true
|
||||
|
||||
@@ -7,12 +7,13 @@ uwsgi:
|
||||
|
||||
# By default uWSGI allocates a very small buffer (4096 bytes) for the
|
||||
# headers of each request. If you start receiving "invalid request
|
||||
# block size" in your logs, it could mean you need a bigger buffer.
|
||||
# Increase it up to 65535.
|
||||
buffer-size: 4096
|
||||
# block size" in your logs, it could mean you need a bigger buffer. We
|
||||
# recommend at least 16384.
|
||||
buffer-size: 16384
|
||||
|
||||
# Number of web server (worker) processes to fork after the
|
||||
# application has loaded.
|
||||
# application has loaded. If this is set to greater than 1, thunder-
|
||||
# lock likely should be enabled below.
|
||||
processes: 1
|
||||
|
||||
# Number of threads for each web server process.
|
||||
@@ -43,6 +44,10 @@ uwsgi:
|
||||
# Reports, etc.) that you are loading.
|
||||
module: galaxy.webapps.tool_shed.buildapp:uwsgi_app()
|
||||
|
||||
# It is usually a good idea to set this to ``true`` if processes is
|
||||
# greater than 1.
|
||||
thunder-lock: false
|
||||
|
||||
# Cause uWSGI to respect the traditional behavior of dying on SIGTERM
|
||||
# (its default is to brutally reload workers)
|
||||
die-on-term: true
|
||||
|
||||
@@ -3435,6 +3435,38 @@
|
||||
:Type: str
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``workflow_resource_params_file``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Similar to the above parameter, workflows can describe parameters
|
||||
used to influence scheduling of jobs within the workflow. This
|
||||
requires both a description of the fields available (which
|
||||
defaults to the definitions in job_resource_params_file if not
|
||||
set).
|
||||
:Default: ``config/workflow_resource_params_conf.xml``
|
||||
:Type: str
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``workflow_resource_params_mapper``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
This parameter describes how to map users and workflows to a set
|
||||
of workflow resource parameter to present (typically input IDs
|
||||
from workflow_resource_params_file). If this this is a function
|
||||
reference it will be passed various inputs (workflow model object
|
||||
and user) and it should produce a list of input IDs. If it is a
|
||||
path it is expected to an XML or YAML file describing how to map
|
||||
group names to parameter descriptions (additional types of
|
||||
mappings via these files could be implemented but haven't yet -
|
||||
for instance using workflow tags to do the mapping).
|
||||
:Default: ``config/workflow_resource_mapper_conf.yml``
|
||||
:Type: str
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``cache_user_job_count``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -54,12 +54,12 @@ UWSGI_OPTIONS = OrderedDict([
|
||||
'type': 'str',
|
||||
}),
|
||||
('buffer-size', {
|
||||
'desc': """By default uWSGI allocates a very small buffer (4096 bytes) for the headers of each request. If you start receiving "invalid request block size" in your logs, it could mean you need a bigger buffer. Increase it up to 65535.""",
|
||||
'default': 4096,
|
||||
'desc': """By default uWSGI allocates a very small buffer (4096 bytes) for the headers of each request. If you start receiving "invalid request block size" in your logs, it could mean you need a bigger buffer. We recommend at least 16384.""",
|
||||
'default': 16384,
|
||||
'type': 'int',
|
||||
}),
|
||||
('processes', {
|
||||
'desc': """Number of web server (worker) processes to fork after the application has loaded.""",
|
||||
'desc': """Number of web server (worker) processes to fork after the application has loaded. If this is set to greater than 1, thunder-lock likely should be enabled below.""",
|
||||
'default': 1,
|
||||
'type': 'int',
|
||||
}),
|
||||
@@ -105,6 +105,11 @@ UWSGI_OPTIONS = OrderedDict([
|
||||
'default': '$uwsgi_module',
|
||||
'type': 'str',
|
||||
}),
|
||||
('thunder-lock', {
|
||||
'desc': """It is usually a good idea to set this to ``true`` if processes is greater than 1.""",
|
||||
'default': False,
|
||||
'type': 'bool',
|
||||
}),
|
||||
('die-on-term', {
|
||||
'desc': """Cause uWSGI to respect the traditional behavior of dying on SIGTERM (its default is to brutally reload workers)""",
|
||||
'default': True,
|
||||
|
||||
@@ -23,7 +23,7 @@ ALIASES = {
|
||||
'module': ('mount',), # mount is not actually an alias for module, but we don't want to set module if mount is set
|
||||
}
|
||||
DEFAULT_ARGS = {
|
||||
'_all_': ('virtualenv', 'pythonpath', 'threads', 'http', 'static-map', 'die-on-term', 'hook-master-start', 'enable-threads'),
|
||||
'_all_': ('virtualenv', 'pythonpath', 'threads', 'buffer-size', 'http', 'static-map', 'die-on-term', 'hook-master-start', 'enable-threads'),
|
||||
'galaxy': ('py-call-osafterfork',),
|
||||
'reports': (),
|
||||
'tool_shed': (),
|
||||
@@ -89,6 +89,7 @@ def _get_uwsgi_args(cliargs, kwargs):
|
||||
'virtualenv': os.environ.get('VIRTUAL_ENV', './.venv'),
|
||||
'pythonpath': 'lib',
|
||||
'threads': '4',
|
||||
'buffer-size': '16384', # https://github.com/galaxyproject/galaxy/issues/1530
|
||||
'http': 'localhost:{port}'.format(port=DEFAULT_PORTS[cliargs.app]),
|
||||
'static-map': ('/static/style={here}/static/style/blue'.format(here=os.getcwd()),
|
||||
'/static={here}/static'.format(here=os.getcwd())),
|
||||
|
||||
Reference in New Issue
Block a user