diff --git a/config/galaxy.yml.sample b/config/galaxy.yml.sample index 3dd01642c9a..019a881231e 100644 --- a/config/galaxy.yml.sample +++ b/config/galaxy.yml.sample @@ -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 diff --git a/config/reports.yml.sample b/config/reports.yml.sample index 9139904172f..b619b2a8058 100644 --- a/config/reports.yml.sample +++ b/config/reports.yml.sample @@ -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 diff --git a/config/tool_shed.yml.sample b/config/tool_shed.yml.sample index b7d125f9a9d..cb593912903 100644 --- a/config/tool_shed.yml.sample +++ b/config/tool_shed.yml.sample @@ -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 diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index c2c56b16a97..690c9349d50 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -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`` ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/lib/galaxy/webapps/config_manage.py b/lib/galaxy/webapps/config_manage.py index 7ff45eb3f29..80d698c6210 100644 --- a/lib/galaxy/webapps/config_manage.py +++ b/lib/galaxy/webapps/config_manage.py @@ -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, diff --git a/scripts/get_uwsgi_args.py b/scripts/get_uwsgi_args.py index 9ec8468113c..333bd9e976f 100644 --- a/scripts/get_uwsgi_args.py +++ b/scripts/get_uwsgi_args.py @@ -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())),